[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-Id: <20080528155719.3114d54f.akpm@linux-foundation.org>
Date: Wed, 28 May 2008 15:57:19 -0700
From: Andrew Morton <akpm@...ux-foundation.org>
To: Aristeu Rozanski <aris@...vo.org>
Cc: jirislaby@...il.com, linux-kernel@...r.kernel.org,
alan@...rguk.ukuu.org.uk
Subject: Re: [PATCH 1/1] Char: vt, make sysfs operations atomic
On Tue, 27 May 2008 16:48:58 -0400
Aristeu Rozanski <aris@...vo.org> wrote:
> >> the reason for the code be the way it is is because vcs_{add,remove}_sysfs()
> >> may sleep
> >
> > What's the point? To have races in the code but not sleep inside the semaphore?
> what about fixing the code to remove the race _and_ not sleep inside the
> semaphore? :)
>
The patch does fix a race, by extending console_sem coverage to provide
exclusion between the sysfs creation and teardown operations.
I assume - no race was identified in the changelog. Can we actually
simultaneously run con_open() and con_close() against the same device?
I guess it might be possible if userspace tried hard enough.
I renamed the patch to the much more accurate "vt: hold console_sem
across sysfs operations" - "atomic" in the kernel context means "cannot
context switch" and nothing "atomic" is happening in this patch.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists