lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  PHC 
Open Source and information security mailing list archives
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Thu, 20 Mar 2014 08:06:01 -0700
From:	"Paul E. McKenney" <>
To:	Arend van Spriel <>
Cc:	Monam Agarwal <>,,,
Subject: Re: [PATCH 0/9] Replace rcu_assign_pointer(x, NULL) with

On Thu, Mar 20, 2014 at 03:58:52PM +0100, Arend van Spriel wrote:
> On 20/03/14 15:37, Monam Agarwal wrote:
> >This patchset uses following coccinelle script to replace
> >rcu_assign_pointer(x, NULL) with RCU_INIT_POINTER(x,NULL)
> >
> >@@
> >expression E;
> >@@
> >- rcu_assign_pointer(
> >E, NULL)
> I am not very familiar with rcu functionality nor coccinelle, but it
> looks too generic. I would think only NULL assignments during
> initialization should use RCU_INIT_POINTER(). The first patch in the
> series does it in a function called unregister_...(). Is it really
> ok to do there?

Hello, Arend,

The thing that rcu_assign_pointer() is doing is ensuring that the
initialization of a structure is carried out before storing a pointer
to that structure.  In the case of the NULL pointer, there is no
structure to initialize, so nothing need be ordered.

So, yes, rcu_assign_pointer(p, NULL) can always safely be converted to

							Thanx, Paul

To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
More majordomo info at
Please read the FAQ at

Powered by blists - more mailing lists