lkml.org 
[lkml]   [2003]   [Apr]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [patch 2.4] make tty->count atomic_t
From
Date
>>>>> "Russell" == Russell King <rmk@arm.linux.org.uk> writes:

Russell> On Thu, Apr 03, 2003 at 12:16:21PM -0500, Jes Sorensen wrote:
>> I believe the 2.4 tty code is racey in the way it handles
>> tty->count. release_dev() does the tty->count-- thing without
>> protecting against parallel execution, hence tty->count can end up
>> a random state as
tty-> count-- isn't guaranteed to be atomic (load-store architectures
tty-> and
>> architectures with weak memory ordering etc).

Russell> Isn't release_dev() only called under the BKL, which
Russell> guarantees the old "single-thread in the kernel at a time"
Russell> behaviour from pre-SMP Linux ?

It's called from tty_release() and tty_open(). tty_release() grabs the
BKL but I don't see the path that grabs it when calling through
tty_open() (doesn't mean I am not blind of course ;-).

cheers,
Jes
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:34    [W:0.053 / U:0.272 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site