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: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Mon, 12 Dec 2011 07:24:41 -0800
From:	Greg KH <gregkh@...e.de>
To:	Peter Zijlstra <peterz@...radead.org>
Cc:	Ming Lei <tom.leiming@...il.com>, akpm@...ux-foundation.org,
	linux-kernel@...r.kernel.org, ostrikov@...dia.com,
	adobriyan@...il.com, eric.dumazet@...il.com, mingo@...e.hu,
	Oliver Neukum <oneukum@...e.de>
Subject: Re: [PATCH 3/3] kref: Remove the memory barriers

On Mon, Dec 12, 2011 at 09:55:57AM +0100, Peter Zijlstra wrote:
> On Mon, 2011-12-12 at 11:48 +0800, Ming Lei wrote:
> > We can't assume any lock about kref usage, because kref is often used
> > in lockless scenario. 
> 
> Then you're doing it wrong, seriously.
> 
> kref in lockless scenarios simply doesn't work, you need rcu (or another
> means to stabilize storage) and atomic_inc_not_zero() as well as means
> to validate your object after the lookup.

I agree, and I'll apply your patches later today, thanks for doing them.

greg k-h
--
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