From: Alex Bligh - linux-kernel <linux-kernel@alex.org.uk>
To: Alan Cox <alan@lxorguk.ukuu.org.uk>, linux-kernel@alex.org.uk
Cc: Dawson Engler <engler@csl.Stanford.EDU>,
Evan Parker <nave@stanford.edu>,
linux-kernel@vger.kernel.org, mc@CS.Stanford.EDU,
Alex Bligh - linux-kernel <linux-kernel@alex.org.uk>
Subject: Re: [CHECKER] repetitive/contradictory comparison bugs for 2.4.7
Date: Thu, 26 Jul 2001 23:24:37 +0100 [thread overview]
Message-ID: <611713474.996189877@[169.254.62.211]> (raw)
In-Reply-To: <E15PtGc-0004ad-00@the-village.bc.nu>
In-Reply-To: <E15PtGc-0004ad-00@the-village.bc.nu>
<alan@lxorguk.ukuu.org.uk> wrote:
>> How will this be guaranteed to help handle a race, when gcc is
>> likely either to have tmp_buf in a register (not declared
>> volatile), or perhaps even optimize out the second reference.
>
> The function call is a synchronization pointAlan,
Ooops - indeed, yes. Though the cli()/restore_flags() doesn't seem
like the right way to perform a lock. My naive interpretation is
that either it needs a (faster) real lock that doesn't disable IRQs on
multiple CPUs etc., or lock_kernel does the job in which
case cli()/restore_flags() is redundant, and, indeed, so is the
check itself. May be I have missed something (again).
I am presuming even an inline cli() is a synchronization point too,
else there would still be a race if the read of tmp_buf in
if(tmp_buf) and the cli() were reordered.
--
Alex Bligh
prev parent reply other threads:[~2001-07-26 22:25 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2001-07-25 0:08 Evan Parker
2001-07-25 0:51 ` Neil Brown
2001-07-25 8:27 ` Russell King
2001-07-25 13:34 ` Alan Cox
2001-07-26 1:13 ` Dawson Engler
2001-07-26 19:54 ` Alex Bligh - linux-kernel
2001-07-26 20:15 ` Russell King
2001-07-26 22:07 ` Alan Cox
2001-07-26 22:06 ` Alan Cox
2001-07-26 22:24 ` Alex Bligh - linux-kernel [this message]
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='611713474.996189877@[169.254.62.211]' \
--to=linux-kernel@alex.org.uk \
--cc=alan@lxorguk.ukuu.org.uk \
--cc=engler@csl.Stanford.EDU \
--cc=linux-kernel@vger.kernel.org \
--cc=mc@CS.Stanford.EDU \
--cc=nave@stanford.edu \
/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
all inboxes | Powered by JetHome®