mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-05 10:31:46 +09:00
net: avoid weird emergency message
[ Upstream commit d7c04b05c9 ]
When host is under high stress, it is very possible thread
running netdev_wait_allrefs() returns from msleep(250)
10 seconds late.
This leads to these messages in the syslog :
[...] unregister_netdevice: waiting for syz_tun to become free. Usage count = 0
If the device refcount is zero, the wait is over.
Signed-off-by: Eric Dumazet <edumazet@google.com>
Reported-by: syzbot <syzkaller@googlegroups.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
bbcb3c09ea
commit
a1e1577d9e
@@ -7852,7 +7852,7 @@ static void netdev_wait_allrefs(struct net_device *dev)
|
||||
|
||||
refcnt = netdev_refcnt_read(dev);
|
||||
|
||||
if (time_after(jiffies, warning_time + 10 * HZ)) {
|
||||
if (refcnt && time_after(jiffies, warning_time + 10 * HZ)) {
|
||||
pr_emerg("unregister_netdevice: waiting for %s to become free. Usage count = %d\n",
|
||||
dev->name, refcnt);
|
||||
warning_time = jiffies;
|
||||
|
||||
Reference in New Issue
Block a user