Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 2870a94f authored by Sharath Chandra Vurukala's avatar Sharath Chandra Vurukala Committed by Gerrit - the friendly Code Review server
Browse files

dev: unregister netdev after 10hz



Unregister the netdev, if the refcount does not become
zero even after 10HZ of wait time.

Change-Id: I4d2a18f09e81ddb9bb8ece1d5aef2259194e3b12
Signed-off-by: default avatarSharath Chandra Vurukala <sharathv@codeaurora.org>
parent 2c840c5f
Loading
Loading
Loading
Loading
+4 −3
Original line number Diff line number Diff line
@@ -7934,6 +7934,7 @@ static void netdev_wait_allrefs(struct net_device *dev)
			pr_emerg("unregister_netdevice: waiting for %s to become free. Usage count = %d\n",
				 dev->name, refcnt);
			warning_time = jiffies;
			break;
		}
	}
}
@@ -7997,9 +7998,9 @@ void netdev_run_todo(void)
		netdev_wait_allrefs(dev);

		/* paranoia */
		BUG_ON(netdev_refcnt_read(dev));
		BUG_ON(!list_empty(&dev->ptype_all));
		BUG_ON(!list_empty(&dev->ptype_specific));
		WARN_ON(netdev_refcnt_read(dev));
		WARN_ON(!list_empty(&dev->ptype_all));
		WARN_ON(!list_empty(&dev->ptype_specific));
		WARN_ON(rcu_access_pointer(dev->ip_ptr));
		WARN_ON(rcu_access_pointer(dev->ip6_ptr));
		WARN_ON(dev->dn_ptr);