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>
This commit is contained in:
Kirill Tkhai 2018-03-14 22:17:28 +03:00 committed by David S. Miller
parent 79ffdfc652
commit b0f3debc9a
1 changed files with 2 additions and 1 deletions

View File

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