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:	Fri, 04 Dec 2009 12:40:58 +0100
From:	Eric Dumazet <eric.dumazet@...il.com>
To:	Krishna Kumar <krkumar2@...ibm.com>
CC:	davem@...emloft.net, netdev@...r.kernel.org
Subject: Re: [PATCH] ipv6: Fix "waiting for %s to become free" hang

Krishna Kumar a écrit :
> From: Krishna Kumar <krkumar2@...ibm.com>
> 
> (From code-walkthrough, and untested)
> 
> Fix "waiting for %s to become free" hang. dev has an
> extra hold (by ip6mr_reg_vif) which was not dropped
> before calling unregister_netdevice.
> 
> Signed-off-by: Krishna Kumar <krkumar2@...ibm.com>
> ---
>  net/ipv6/ip6mr.c |    2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff -ruNp org/net/ipv6/ip6mr.c new/net/ipv6/ip6mr.c
> --- org/net/ipv6/ip6mr.c	2009-12-04 16:08:07.000000000 +0530
> +++ new/net/ipv6/ip6mr.c	2009-12-04 16:09:56.000000000 +0530
> @@ -648,8 +648,8 @@ static int mif6_add(struct net *net, str
>  			return -ENOBUFS;
>  		err = dev_set_allmulti(dev, 1);
>  		if (err) {
> -			unregister_netdevice(dev);
>  			dev_put(dev);
> +			unregister_netdevice(dev);
>  			return err;
>  		}
>  		break;

This changes nothing, since we hold rtnl at this point.

unregister_netdevice() only queues the device (net_set_todo()) in a list.

And we process this list later, when renl_unlock() is finally called.

--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ