diff options
author | Patrick McHardy <kaber@trash.net> | 2011-06-16 17:09:54 +0200 |
---|---|---|
committer | Patrick McHardy <kaber@trash.net> | 2011-06-16 17:09:54 +0200 |
commit | 122c4f10f7b66f9c7a0177de668e9662b0b14a05 (patch) | |
tree | c30c5b546651fb97eb7ce1867e24091fadf28447 /net | |
parent | 264524d5e5195f6e0f099bee20253a22b651e272 (diff) | |
parent | 8f4e0a18682d91abfad72ede3d3cb5f3ebdf54b4 (diff) |
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/horms/ipvs-2.6
Diffstat (limited to 'net')
-rw-r--r-- | net/netfilter/ipvs/ip_vs_conn.c | 10 | ||||
-rw-r--r-- | net/netfilter/ipvs/ip_vs_core.c | 1 |
2 files changed, 10 insertions, 1 deletions
diff --git a/net/netfilter/ipvs/ip_vs_conn.c b/net/netfilter/ipvs/ip_vs_conn.c index bf28ac2fc99..782db275ac5 100644 --- a/net/netfilter/ipvs/ip_vs_conn.c +++ b/net/netfilter/ipvs/ip_vs_conn.c @@ -776,8 +776,16 @@ static void ip_vs_conn_expire(unsigned long data) if (cp->control) ip_vs_control_del(cp); - if (cp->flags & IP_VS_CONN_F_NFCT) + if (cp->flags & IP_VS_CONN_F_NFCT) { ip_vs_conn_drop_conntrack(cp); + /* Do not access conntracks during subsys cleanup + * because nf_conntrack_find_get can not be used after + * conntrack cleanup for the net. + */ + smp_rmb(); + if (ipvs->enable) + ip_vs_conn_drop_conntrack(cp); + } ip_vs_pe_put(cp->pe); kfree(cp->pe_data); diff --git a/net/netfilter/ipvs/ip_vs_core.c b/net/netfilter/ipvs/ip_vs_core.c index 55af2242bcc..24c28d238dc 100644 --- a/net/netfilter/ipvs/ip_vs_core.c +++ b/net/netfilter/ipvs/ip_vs_core.c @@ -1945,6 +1945,7 @@ static void __net_exit __ip_vs_dev_cleanup(struct net *net) { EnterFunction(2); net_ipvs(net)->enable = 0; /* Disable packet reception */ + smp_wmb(); __ip_vs_sync_cleanup(net); LeaveFunction(2); } |