Skip to contentSkip to conversation

netfilter: CLUSTERIP: Fix one wrong refcnt usage

PATCH In review [email protected] 2 participants 2 messages Apr 6, 2017 – Apr 13, 2017

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 netfilter: CLUSTERIP: Fix one wrong refcnt usage

From: Gao Feng <[email protected]>

Current codes invoke wrongly nf_ct_netns_get in the destroy routine, it should use nf_ct_netns_put, not nf_ct_netns_get.
It could cause some modules could not be unloaded.

---
 net/ipv4/netfilter/ipt_CLUSTERIP.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
net/ipv4/netfilter/ipt_CLUSTERIP.c +1 -1
index 52f2645..9b88413 100644
@@ -461,7 +461,7 @@ static void clusterip_tg_destroy(const struct xt_tgdtor_param *par)
 
 	clusterip_config_put(cipinfo->config);
 
-	nf_ct_netns_get(par->net, par->family);
+	nf_ct_netns_put(par->net, par->family);
 }
 
 #ifdef CONFIG_COMPAT
Signature · 1 line
1.9.1
#1 lore raw
Quoted 5 lines · On Thu, Apr 06, 2017 at 09:45:22AM +0800, [email protected] wrote:

From: Gao Feng <[email protected]>

Current codes invoke wrongly nf_ct_netns_get in the destroy routine, it should use nf_ct_netns_put, not nf_ct_netns_get.
It could cause some modules could not be unloaded.

Applied with patch title:

netfilter: CLUSTERIP: Fix wrong conntrack netns refcnt usage

Thanks!