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]
Date:	Wed, 17 Feb 2016 12:01:10 -0700
From:	David Ahern <dsa@...ulusnetworks.com>
To:	Nikolay Aleksandrov <razor@...ckwall.org>, netdev@...r.kernel.org
Cc:	Nikolay Aleksandrov <nikolay@...ulusnetworks.com>,
	"David S. Miller" <davem@...emloft.net>,
	Roopa Prabhu <roopa@...ulusnetworks.com>,
	Vlad Yasevich <vyasevic@...hat.com>
Subject: Re: [PATCH net] net: make netdev_for_each_lower_dev safe for device
 removal

On 2/17/16 10:00 AM, Nikolay Aleksandrov wrote:
> From: Nikolay Aleksandrov <nikolay@...ulusnetworks.com>
>
> When I used netdev_for_each_lower_dev in commit bad531623253 ("vrf:
> remove slave queue and private slave struct") I thought that it acts
> like netdev_for_each_lower_private and can be used to remove the current
> device from the list while walking, but unfortunately it acts more like
> netdev_for_each_lower_private_rcu and doesn't allow it. The difference
> is where the "iter" points to, right now it points to the current element
> and that makes it impossible to remove it. Change the logic to be
> similar to netdev_for_each_lower_private and make it point to the "next"
> element so we can safely delete the current one. VRF is the only such
> user right now, there's no change for the read-only users.
>

-----8<-----

>
> CC: David Ahern <dsa@...ulusnetworks.com>
> CC: David S. Miller <davem@...emloft.net>
> CC: Roopa Prabhu <roopa@...ulusnetworks.com>
> CC: Vlad Yasevich <vyasevic@...hat.com>
> Fixes: bad531623253 ("vrf: remove slave queue and private slave struct")
> Signed-off-by: Nikolay Aleksandrov <nikolay@...ulusnetworks.com>
> ---
>   include/linux/netdevice.h | 2 +-
>   net/core/dev.c            | 4 ++--
>   2 files changed, 3 insertions(+), 3 deletions(-)

Solves the problem for me. Thanks for the quick turnaround, Nik.

Reviewed-by / Tested-by: David Ahern <dsa@...ulusnetworks.com>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ