mirror of
https://github.com/torvalds/linux.git
synced 2024-11-14 16:12:02 +00:00
ipvs: Fix possible deadlock in sync code
Commit 998e7a7680
("ipvs: Use kthread_run()
instead of doing a double-fork via kernel_thread()") introduced a possible
deadlock in the sync code. We need to use the _bh versions for the lock, as the
lock is also accessed from a bottom half.
Signed-off-by: Sven Wegener <sven.wegener@stealer.net>
Acked-by: Simon Horman <horms@verge.net.au>
This commit is contained in:
parent
8123b421e8
commit
bc0fde2fad
@ -904,9 +904,9 @@ int stop_sync_thread(int state)
|
||||
* progress of stopping the master sync daemon.
|
||||
*/
|
||||
|
||||
spin_lock(&ip_vs_sync_lock);
|
||||
spin_lock_bh(&ip_vs_sync_lock);
|
||||
ip_vs_sync_state &= ~IP_VS_STATE_MASTER;
|
||||
spin_unlock(&ip_vs_sync_lock);
|
||||
spin_unlock_bh(&ip_vs_sync_lock);
|
||||
kthread_stop(sync_master_thread);
|
||||
sync_master_thread = NULL;
|
||||
} else if (state == IP_VS_STATE_BACKUP) {
|
||||
|
Loading…
Reference in New Issue
Block a user