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] [day] [month] [year] [list]
Date:   Tue, 10 Jan 2017 12:02:13 -0500 (EST)
From:   David Miller <davem@...emloft.net>
To:     hadarh@...lanox.com
Cc:     netdev@...r.kernel.org, ogerlitz@...lanox.com, idosch@...lanox.com
Subject: Re: using rcu_read_lock() after calling dst_neigh_lookup

From: Hadar Hen Zion <hadarh@...lanox.com>
Date: Tue, 10 Jan 2017 16:22:51 +0200

> While the documentation in neighbour.c says:
> 
>  "Neighbour entries are protected:
>    - with reference count.
>    - with rwlock neigh->lock
>    Reference count prevents destruction.
>    neigh->lock mainly serializes ll address data and its validity state."
> 
> So what is the right way to protect the neigh entry parameters? I
> couldn't find why rcu_read_lock() is helping here (dst_neigh_lookup
> already takes a reference on the neigh).

Documentation is, unfortunately, out of date.

When there is a mis-match, usually the behavior of the code in the
tree trumps whatever the documentation says.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ