summaryrefslogtreecommitdiffstats
path: root/include/linux/rtnetlink.h
diff options
context:
space:
mode:
authorKirill Tkhai <ktkhai@virtuozzo.com>2018-03-14 22:17:20 +0300
committerDavid S. Miller <davem@davemloft.net>2018-03-16 12:31:19 -0400
commit79ffdfc6522ae33d8a33e971070c08ee5f27439b (patch)
tree415425dcf355385d0847a857c0f03094604668cc /include/linux/rtnetlink.h
parent320bd6de79ef0de1ece7c184469a722de690ccb0 (diff)
downloadlinux-stable-79ffdfc6522ae33d8a33e971070c08ee5f27439b.tar.gz
linux-stable-79ffdfc6522ae33d8a33e971070c08ee5f27439b.tar.bz2
linux-stable-79ffdfc6522ae33d8a33e971070c08ee5f27439b.zip
net: Add rtnl_lock_killable()
rtnl_lock() is widely used mutex in kernel. Some of kernel code does memory allocations under it. In case of memory deficit this may invoke OOM killer, but the problem is a killed task can't exit if it's waiting for the mutex. This may be a reason of deadlock and panic. This patch adds a new primitive, which responds on SIGKILL, and it allows to use it in the places, where we don't want to sleep forever. Signed-off-by: Kirill Tkhai <ktkhai@virtuozzo.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/linux/rtnetlink.h')
-rw-r--r--include/linux/rtnetlink.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/include/linux/rtnetlink.h b/include/linux/rtnetlink.h
index 3573b4bf2fdf..562a175c35a9 100644
--- a/include/linux/rtnetlink.h
+++ b/include/linux/rtnetlink.h
@@ -33,6 +33,7 @@ extern void rtnl_lock(void);
extern void rtnl_unlock(void);
extern int rtnl_trylock(void);
extern int rtnl_is_locked(void);
+extern int rtnl_lock_killable(void);
extern wait_queue_head_t netdev_unregistering_wq;
extern struct rw_semaphore net_sem;