mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-08-26 19:00:25 +00:00
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
1 changed files with 2 additions and 1 deletions
|
@ -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 a new issue