From: Russell King <rmk@arm.linux.org.uk>
To: Jes Sorensen <jes@wildopensource.com>
Cc: linux-kernel@vger.kernel.org, alan@redhat.com,
Marcelo Tosatti <marcelo@conectiva.com.br>
Subject: Re: [patch 2.4] make tty->count atomic_t
Date: Fri, 4 Apr 2003 00:28:52 +0100 [thread overview]
Message-ID: <20030404002852.D18485@flint.arm.linux.org.uk> (raw)
In-Reply-To: <m3of3ndvb5.fsf@trained-monkey.org>; from jes@wildopensource.com on Thu, Apr 03, 2003 at 06:18:22PM -0500
On Thu, Apr 03, 2003 at 06:18:22PM -0500, Jes Sorensen wrote:
> >>>>> "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 ;-).
It's hidden away in fs/devices.c:chrdev_open()
--
Russell King (rmk@arm.linux.org.uk) The developer of ARM Linux
http://www.arm.linux.org.uk/personal/aboutme.html
next prev parent reply other threads:[~2003-04-03 23:17 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-04-03 17:16 [patch 2.4] make tty->count atomic_t Jes Sorensen
2003-04-03 23:06 ` Russell King
2003-04-03 23:18 ` Jes Sorensen
2003-04-03 23:28 ` Russell King [this message]
2003-04-04 0:13 ` Jes Sorensen
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20030404002852.D18485@flint.arm.linux.org.uk \
--to=rmk@arm.linux.org.uk \
--cc=alan@redhat.com \
--cc=jes@wildopensource.com \
--cc=linux-kernel@vger.kernel.org \
--cc=marcelo@conectiva.com.br \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox