[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <152105504831.24797.8372021805674601073.stgit@localhost.localdomain>
Date: Wed, 14 Mar 2018 22:17:28 +0300
From: Kirill Tkhai <ktkhai@...tuozzo.com>
To: davem@...emloft.net, ktkhai@...tuozzo.com, vyasevic@...hat.com,
edumazet@...gle.com, nicolas.dichtel@...nd.com,
netdev@...r.kernel.org
Subject: [PATCH net-next 2/2] 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@...tuozzo.com>
---
net/core/dev.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
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;
Powered by blists - more mailing lists