diff options
author | Kirill Tkhai <ktkhai@virtuozzo.com> | 2018-03-14 22:17:28 +0300 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2018-03-16 12:31:19 -0400 |
commit | b0f3debc9a1284d6b861e3f7cce0d119e6cd601d (patch) | |
tree | 4c627299436d5e6218cbb07d6bd28ca45e8a4f4e /net/core | |
parent | 79ffdfc6522ae33d8a33e971070c08ee5f27439b (diff) | |
download | linux-b0f3debc9a1284d6b861e3f7cce0d119e6cd601d.tar.bz2 |
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>
Diffstat (limited to 'net/core')
-rw-r--r-- | net/core/dev.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/net/core/dev.c b/net/core/dev.c index 12a9aad0b057..d8887cc38e7b 100644 --- a/net/core/dev.c +++ b/net/core/dev.c @@ -8018,7 +8018,8 @@ int register_netdev(struct net_device *dev) { int err; - rtnl_lock(); + if (rtnl_lock_killable()) + return -EINTR; err = register_netdevice(dev); rtnl_unlock(); return err; |