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] [day] [month] [year] [list]
Message-ID: <56AF3C95.3040606@cumulusnetworks.com>
Date:	Mon, 1 Feb 2016 12:08:05 +0100
From:	Nikolay Aleksandrov <nikolay@...ulusnetworks.com>
To:	zyjzyj2000@...il.com, j.vosburgh@...il.com, vfalico@...il.com,
	gospo@...ulusnetworks.com, netdev@...r.kernel.org
Subject: Re: [PATCH 1/1] bond: relocate rcu_read_lock and rcu_read_unlock

On 02/01/2016 12:01 PM, Nikolay Aleksandrov wrote:
> On 02/01/2016 04:31 AM, zyjzyj2000@...il.com wrote:
>> From: Zhu Yanjun <zyjzyj2000@...il.com>
>>
>> rcu_read_lock and rcu_read_unlock are to protect the function
>> bond_miimon_inspect. As such, moving rcu_read_lock and rcu_read_unlock
>> to the function bond_miimon_inspect to make the source code compact.
>>
>> CC: Jay Vosburgh <j.vosburgh@...il.com>
>> CC: Veaceslav Falico <vfalico@...il.com>
>> CC: Andy Gospodarek <gospo@...ulusnetworks.com>
>> Signed-off-by: Zhu Yanjun <zyjzyj2000@...il.com>
>> ---
>>  drivers/net/bonding/bond_main.c | 9 ++++-----
>>  1 file changed, 4 insertions(+), 5 deletions(-)
>>
> 
> Not true, RCU also protects the slave dereference in bond_should_notify_peers().
> Even though there's already a rcu_read_lock() while doing the dereference
> itself, it is there only to please RCU, IIRC. The only "simplification" you

Err, I meant to please lockdep when being called with RTNL.

> can do is remove the rcu_read_lock/unlock() around the slave deref in
> bond_should_notify_peers and use rcu_dereference_rtnl() as it can be used either
> in RCU protected region or with RTNL held. Also I think net-next is still
> closed (and that's where this should be targeted at).
> 
> Cheers,
>  Nik
> 
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ