public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: "Paul E. McKenney" <paulmck@linux.vnet.ibm.com>
To: Matthew Helsley <matthltc@us.ibm.com>
Cc: linux-kernel@vger.kernel.org, akpm@linux-foundation.org
Subject: Re: [PATCH] State limits to safety of _safe iterators
Date: Thu, 13 Sep 2007 08:21:07 -0700	[thread overview]
Message-ID: <20070913152107.GC12806@linux.vnet.ibm.com> (raw)
In-Reply-To: <1189675366.5518.12.camel@localhost.localdomain>

On Thu, Sep 13, 2007 at 02:22:45AM -0700, Matthew Helsley wrote:
> On Wed, 2007-09-12 at 18:01 -0700, Paul E. McKenney wrote:
> > The _safe list iterators make a blanket statement about how they are
> > safe against removal.  This patch, inspired by private conversations
> > with people who unwisely but perhaps understandably took this blanket
> > statement at its word, adds comments stating limits to this safety.
> > 
> > Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
> > ---
> > 
> >  list.h |   42 ++++++++++++++++++++++++++++++++++++++++++
> >  1 file changed, 42 insertions(+)
> > 
> > diff -urpNa -X dontdiff linux-2.6.22/include/linux/list.h linux-2.6.22-safedoc/include/linux/list.h
> > --- linux-2.6.22/include/linux/list.h	2007-07-08 16:32:17.000000000 -0700
> > +++ linux-2.6.22-safedoc/include/linux/list.h	2007-09-12 17:45:38.000000000 -0700
> > @@ -472,6 +472,12 @@ static inline void list_splice_init_rcu(
> >   * @pos:	the &struct list_head to use as a loop cursor.
> >   * @n:		another &struct list_head to use as temporary storage
> >   * @head:	the head for your list.
> > + *
> > + * Please note that this is safe only against removal by the code in
> 
> I'm not trying to be snarky but how far should we go before expecting
> folks to read the macros? Depending on the answer you may also want to
> mention that without additional additional code it's safe only against
> removal of the list element at pos.

Good question.  In fact, I would have agreed with you before coming
across people who in my experience are generally reasonably well clued
in who were confused about this.

							Thanx, Paul

  reply	other threads:[~2007-09-13 15:21 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-09-13  1:01 [PATCH] State limits to safety of _safe iterators Paul E. McKenney
2007-09-13  9:22 ` Matthew Helsley
2007-09-13 15:21   ` Paul E. McKenney [this message]
2007-09-15  0:21     ` Andrew Morton
2007-09-17 20:59       ` Paul E. McKenney

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=20070913152107.GC12806@linux.vnet.ibm.com \
    --to=paulmck@linux.vnet.ibm.com \
    --cc=akpm@linux-foundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=matthltc@us.ibm.com \
    /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