public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* Re: On "Unreliable Locking Guide" bug ?
       [not found] <3A89CAA7.5090400@oz.agile.tv>
@ 2001-02-14  4:35 ` Rusty Russell
  0 siblings, 0 replies; only message in thread
From: Rusty Russell @ 2001-02-14  4:35 UTC (permalink / raw)
  To: court; +Cc: alan, linux-kernel

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

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2001-02-14  9:52 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <3A89CAA7.5090400@oz.agile.tv>
2001-02-14  4:35 ` On "Unreliable Locking Guide" bug ? Rusty Russell

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox