commit | b0f3debc9a1284d6b861e3f7cce0d119e6cd601d | [log] [tgz] |
---|---|---|
author | Kirill Tkhai <ktkhai@virtuozzo.com> | Wed Mar 14 22:17:28 2018 +0300 |
committer | David S. Miller <davem@davemloft.net> | Fri Mar 16 12:31:19 2018 -0400 |
tree | 4c627299436d5e6218cbb07d6bd28ca45e8a4f4e | |
parent | 79ffdfc6522ae33d8a33e971070c08ee5f27439b [diff] |
net: Use rtnl_lock_killable() in register_netdev() This patch adds rtnl_lock_killable() to one of hot path using rtnl_lock(). Signed-off-by: Kirill Tkhai <ktkhai@virtuozzo.com> Signed-off-by: David S. Miller <davem@davemloft.net>
diff --git a/net/core/dev.c b/net/core/dev.c index 12a9aad..d8887cc 100644 --- a/net/core/dev.c +++ b/net/core/dev.c
@@ -8018,7 +8018,8 @@ { int err; - rtnl_lock(); + if (rtnl_lock_killable()) + return -EINTR; err = register_netdevice(dev); rtnl_unlock(); return err;