Re: [patch 2.4] make tty->count atomic_t

Russell King (rmk@arm.linux.org.uk)
Fri, 4 Apr 2003 00:06:08 +0100


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 and
> architectures with weak memory ordering etc).

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

-- 
Russell King (rmk@arm.linux.org.uk)                The developer of ARM Linux
             http://www.arm.linux.org.uk/personal/aboutme.html

- 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/