All of lore.kernel.org
 help / color / mirror / Atom feed
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:06:08 +0100	[thread overview]
Message-ID: <20030404000608.B18485@flint.arm.linux.org.uk> (raw)
In-Reply-To: <16012.27749.781757.8312@trained-monkey.org>; from jes@wildopensource.com on Thu, Apr 03, 2003 at 12:16:21PM -0500

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


  reply	other threads:[~2003-04-03 22:54 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 [this message]
2003-04-03 23:18   ` Jes Sorensen
2003-04-03 23:28     ` Russell King
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=20030404000608.B18485@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.