OSDN Git Service
(root)
/
uclinux-h8
/
linux.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
79ffdfc
)
net: Use rtnl_lock_killable() in register_netdev()
author
Kirill Tkhai
<ktkhai@virtuozzo.com>
Wed, 14 Mar 2018 19:17:28 +0000
(22:17 +0300)
committer
David S. Miller
<davem@davemloft.net>
Fri, 16 Mar 2018 16:31:19 +0000
(12:31 -0400)
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>
net/core/dev.c
patch
|
blob
|
history
diff --git
a/net/core/dev.c
b/net/core/dev.c
index
12a9aad
..
d8887cc
100644
(file)
--- 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;