From: Rusty Russell <rusty@linuxcare.com.au>
To: court@oz.agile.tv
Cc: alan@redhat.com, linux-kernel@vger.kernel.org
Subject: Re: On "Unreliable Locking Guide" bug ?
Date: Wed, 14 Feb 2001 15:35:23 +1100 [thread overview]
Message-ID: <E14Stf2-0001th-00@halfway> (raw)
In-Reply-To: Your message of "Wed, 14 Feb 2001 10:00:39 +1000." <3A89CAA7.5090400@oz.agile.tv>
In message <3A89CAA7.5090400@oz.agile.tv> you write:
> Hi Paul,
>
> I am reviewing your "Unreliable Locking Guide" from linux 2.4 and just
> wonder about the
> section on "Avoiding Locks: Read and Write". The two lines of code
>
> new->next = i-> next;
> i->next = new;
Hi John,
Yes, there is of course a lock against other list
manipulations. I've attached a patch to make this clear..
Thanks!
Rusty.
--- linux-2.4.0-official/Documentation/DocBook/kernel-locking.tmpl.~1~ Sat Dec 30 09:07:19 2000
+++ linux-2.4.0-official/Documentation/DocBook/kernel-locking.tmpl Wed Feb 14 15:33:36 2001
@@ -720,7 +720,8 @@
halves without a lock. Depending on their exact timing, they
would either see the new element in the list with a valid
<structfield>next</structfield> pointer, or it would not be in the
- list yet.
+ list yet. A lock is still required against other CPUs inserting
+ or deleting from the list, of course.
</para>
<para>
--
Premature optmztion is rt of all evl. --DK
parent reply other threads:[~2001-02-14 9:52 UTC|newest]
Thread overview: expand[flat|nested] mbox.gz Atom feed
[parent not found: <3A89CAA7.5090400@oz.agile.tv>]
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=E14Stf2-0001th-00@halfway \
--to=rusty@linuxcare.com.au \
--cc=alan@redhat.com \
--cc=court@oz.agile.tv \
--cc=linux-kernel@vger.kernel.org \
/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