mirror of https://gitee.com/openkylin/linux.git
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:
parent
79ffdfc652
commit
b0f3debc9a
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue