mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-06-19 05:04:20 +00:00
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>
This commit is contained in:
parent
320bd6de79
commit
79ffdfc652
2 changed files with 7 additions and 0 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue