public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: "Paul E. McKenney" <paulmck@linux.vnet.ibm.com>
To: David Miller <davem@davemloft.net>
Cc: shemminger@vyatta.com, eric.dumazet@gmail.com,
	mchan@broadcom.com, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] rcu: convert uses of rcu_assign_pointer(x, NULL) to RCU_INIT_POINTER
Date: Tue, 2 Aug 2011 03:32:16 -0700	[thread overview]
Message-ID: <20110802103216.GB2352@linux.vnet.ibm.com> (raw)
In-Reply-To: <20110801.224401.31810103988544647.davem@davemloft.net>

On Mon, Aug 01, 2011 at 10:44:01PM -0700, David Miller wrote:
> From: Stephen Hemminger <shemminger@vyatta.com>
> Date: Mon, 1 Aug 2011 09:19:00 -0700
> 
> > When assigning a NULL value to an RCU protected pointer, no barrier
> > is needed. The rcu_assign_pointer, used to handle that but will soon
> > change to not handle the special case.
> > 
> > Convert all rcu_assign_pointer of NULL value.
> > 
> > //smpl
> > @@ expression P; @@
> > 
> > - rcu_assign_pointer(P, NULL)
> > + RCU_INIT_POINTER(P, NULL)
> > 
> > // </smpl>
> > 
> > 
> > Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
> 
> Acked-by: David S. Miller <davem@davemloft.net>

Very good, thank you!

This patch does not depend on Eric's earlier patch because
RCU_INIT_POINTER() already exists.  So although I would be happy to
carry this patch, there is no reason I can see not to run it up through
net-next.  Either way, the Coccinelle script does look generally
useful.  ;-)

If you would prefer me to carry it, please let me know.  Otherwise:

Acked-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>

							Thanx, Paul

  reply	other threads:[~2011-08-02 10:32 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20110728142723.77a2c308@nehalam.ftrdhcpuser.net>
     [not found] ` <20110728214442.GV2403@linux.vnet.ibm.com>
     [not found]   ` <20110728145510.0ec0db01@nehalam.ftrdhcpuser.net>
     [not found]     ` <20110729003843.GA2373@linux.vnet.ibm.com>
2011-07-29 17:50       ` RCU: how to suppress warnings from rcu_assign_pointer? Stephen Hemminger
2011-07-30 12:17         ` Eric Dumazet
2011-07-31  3:16           ` David Miller
2011-08-01  5:23             ` Paul E. McKenney
2011-08-01  8:47               ` Eric Dumazet
2011-08-01 16:19                 ` [PATCH] rcu: convert uses of rcu_assign_pointer(x, NULL) to RCU_INIT_POINTER Stephen Hemminger
2011-08-02  5:44                   ` David Miller
2011-08-02 10:32                     ` Paul E. McKenney [this message]
2011-08-02 11:29                       ` David Miller

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=20110802103216.GB2352@linux.vnet.ibm.com \
    --to=paulmck@linux.vnet.ibm.com \
    --cc=davem@davemloft.net \
    --cc=eric.dumazet@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mchan@broadcom.com \
    --cc=shemminger@vyatta.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