diff options
author | Hans Schillstrom <hans@schillstrom.com> | 2011-10-11 10:54:35 +0900 |
---|---|---|
committer | Pablo Neira Ayuso <pablo@netfilter.org> | 2011-10-12 18:32:15 +0200 |
commit | ae1d48b23d5e79efbcf0cef4f0ebb9742361af59 (patch) | |
tree | ee357eda6a7a031be2756133a9f31be325081f21 /include/net/ip_vs.h | |
parent | 98d9ae841ad620045d653fb05764e4a899f42dbd (diff) | |
download | linux-stable-ae1d48b23d5e79efbcf0cef4f0ebb9742361af59.tar.gz linux-stable-ae1d48b23d5e79efbcf0cef4f0ebb9742361af59.tar.bz2 linux-stable-ae1d48b23d5e79efbcf0cef4f0ebb9742361af59.zip |
IPVS netns shutdown/startup dead-lock
ip_vs_mutext is used by both netns shutdown code and startup
and both implicit uses sk_lock-AF_INET mutex.
cleanup CPU-1 startup CPU-2
ip_vs_dst_event() ip_vs_genl_set_cmd()
sk_lock-AF_INET __ip_vs_mutex
sk_lock-AF_INET
__ip_vs_mutex
* DEAD LOCK *
A new mutex placed in ip_vs netns struct called sync_mutex is added.
Comments from Julian and Simon added.
This patch has been running for more than 3 month now and it seems to work.
Ver. 3
IP_VS_SO_GET_DAEMON in do_ip_vs_get_ctl protected by sync_mutex
instead of __ip_vs_mutex as sugested by Julian.
Signed-off-by: Hans Schillstrom <hans@schillstrom.com>
Acked-by: Julian Anastasov <ja@ssi.bg>
Signed-off-by: Simon Horman <horms@verge.net.au>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Diffstat (limited to 'include/net/ip_vs.h')
-rw-r--r-- | include/net/ip_vs.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/include/net/ip_vs.h b/include/net/ip_vs.h index 1aaf915656f3..8fa4430f99c1 100644 --- a/include/net/ip_vs.h +++ b/include/net/ip_vs.h @@ -900,6 +900,7 @@ struct netns_ipvs { volatile int sync_state; volatile int master_syncid; volatile int backup_syncid; + struct mutex sync_mutex; /* multicast interface name */ char master_mcast_ifn[IP_VS_IFNAME_MAXLEN]; char backup_mcast_ifn[IP_VS_IFNAME_MAXLEN]; |