All of lore.kernel.org
 help / color / mirror / Atom feed
From: josh@joshtriplett.org
To: Pranith Kumar <bobby.prani@gmail.com>
Cc: "Paul E. McKenney" <paulmck@linux.vnet.ibm.com>,
	Steven Rostedt <rostedt@goodmis.org>,
	Mathieu Desnoyers <mathieu.desnoyers@efficios.com>,
	Lai Jiangshan <laijs@cn.fujitsu.com>,
	"open list:READ-COPY UPDATE..." <linux-kernel@vger.kernel.org>
Subject: Re: [RFC PATCH] rcu: Add sparse check for RCU_INIT_POINTER()
Date: Thu, 25 Sep 2014 11:10:24 -0700	[thread overview]
Message-ID: <20140925181024.GA9360@cloud> (raw)
In-Reply-To: <1411668214-19199-1-git-send-email-bobby.prani@gmail.com>

On Thu, Sep 25, 2014 at 02:03:34PM -0400, Pranith Kumar wrote:
> Add a sparse check when RCU_INIT_POINTER() is used to assign a non __rcu
> annotated pointer. 
> 
> Signed-off-by: Pranith Kumar <bobby.prani@gmail.com>

Have you checked if this introduces a significant number of new warnings
in the kernel?

If not:
Reviewed-by: Josh Triplett <josh@joshtriplett.org>

>  include/linux/rcupdate.h | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/include/linux/rcupdate.h b/include/linux/rcupdate.h
> index a4a819f..a033d8b 100644
> --- a/include/linux/rcupdate.h
> +++ b/include/linux/rcupdate.h
> @@ -1047,6 +1047,7 @@ static inline notrace void rcu_read_unlock_sched_notrace(void)
>   */
>  #define RCU_INIT_POINTER(p, v) \
>  	do { \
> +		rcu_dereference_sparse(p, __rcu); \
>  		p = RCU_INITIALIZER(v); \
>  	} while (0)
>  
> -- 
> 2.1.0
> 

  reply	other threads:[~2014-09-25 18:10 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-09-25 18:03 [RFC PATCH] rcu: Add sparse check for RCU_INIT_POINTER() Pranith Kumar
2014-09-25 18:10 ` josh [this message]
2014-09-25 18:39   ` Pranith Kumar

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=20140925181024.GA9360@cloud \
    --to=josh@joshtriplett.org \
    --cc=bobby.prani@gmail.com \
    --cc=laijs@cn.fujitsu.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mathieu.desnoyers@efficios.com \
    --cc=paulmck@linux.vnet.ibm.com \
    --cc=rostedt@goodmis.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.