lists.openwall.net   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  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20130626152553.GB4405@mtj.dyndns.org>
Date:	Wed, 26 Jun 2013 08:25:53 -0700
From:	Tejun Heo <tj@...nel.org>
To:	"Paul E. McKenney" <paulmck@...ux.vnet.ibm.com>
Cc:	Dipankar Sarma <dipankar@...ibm.com>,
	Fengguang Wu <fengguang.wu@...el.com>,
	"David S. Miller" <davem@...emloft.net>,
	Li Zefan <lizefan@...wei.com>,
	Patrick McHardy <kaber@...sh.net>, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] rculist: list_first_or_null_rcu() should use
 list_entry_rcu()

On Wed, Jun 26, 2013 at 07:17:52AM -0700, Paul E. McKenney wrote:
> > Do you mean something like the following?
> > 
> > 	  struct list_head *__next = ACCESS_ONCE(__ptr->next); \
> > 	  likely(__ptr != __next) ? \
> > 		list_entry_rcu(__next, type, member) : NULL; \
> > 
> > Yeah, that looks right to me.
> 
> I would feel much better about this!  Does it avoid warnings in your
> use cases?

Yeah, it does, and more importantly it adds the missing read barrier
during RCU deref.  I'll give it another test and post the updated
version.

Thanks a lot!

-- 
tejun
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ