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]
Message-ID: <1439594063.7507.11.camel@edumazet-glaptop2.roam.corp.google.com>
Date:	Fri, 14 Aug 2015 16:14:23 -0700
From:	Eric Dumazet <eric.dumazet@...il.com>
To:	David Miller <davem@...emloft.net>,
	David Ahern <dsa@...ulusnetworks.com>
Cc:	netdev <netdev@...r.kernel.org>
Subject: Re: [BUG net-next] infamous dev refcnt leak... again.

On Fri, 2015-08-14 at 14:14 -0700, Eric Dumazet wrote:
> While rebooting host running latest net-next
> 
>  unregister_netdevice: waiting for eth0 to become free. Usage count = 4
> 
> Oh well...
> 

It looks like David Ahern recent changes uncover a bug ?

Not clear which commit is at fault.

Maybe 3bfd847203c6d89532f836ad3f5b4ff4ced26dd9 ?

Somehow a down device can be found.

diff --git a/net/ipv4/fib_semantics.c b/net/ipv4/fib_semantics.c
index b7f1d20..675a3b6 100644
--- a/net/ipv4/fib_semantics.c
+++ b/net/ipv4/fib_semantics.c
@@ -725,10 +725,14 @@ static int fib_check_nh(struct fib_config *cfg, struct fib_info *fi,
 		nh->nh_dev = dev = FIB_RES_DEV(res);
 		if (!dev)
 			goto out;
-		dev_hold(dev);
 		if (!netif_carrier_ok(dev))
 			nh->nh_flags |= RTNH_F_LINKDOWN;
-		err = (dev->flags & IFF_UP) ? 0 : -ENETDOWN;
+		if (dev->flags & IFF_UP) {
+			err = 0;
+			dev_hold(dev);
+		} else {
+			err = -ENETDOWN;
+		}
 	} else {
 		struct in_device *in_dev;
 


--
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