Skip to contentSkip to conversation

netfilter: conntrack: do not disable bh during destruction

PATCH In review Florian Westphal 2 participants 2 messages May 10, 2022 – May 13, 2022

Subsystems (2)
lore
Share & tools
lore

Florian Westphal

author maintainer
#0 lore raw

PATCH 1/1 netfilter: conntrack: do not disable bh during destruction

After commit
12b0b21dc2241 ("netfilter: conntrack: remove unconfirmed list") the extra local_bh disable/enable pair is no longer needed.

---
 net/netfilter/nf_conntrack_core.c | 3 ---
 1 file changed, 3 deletions(-)
net/netfilter/nf_conntrack_core.c +0 -3
index 0db9c5c94b5b..082a2fd8d85b 100644
@@ -596,7 +596,6 @@ void nf_ct_destroy(struct nf_conntrack *nfct)
 	if (unlikely(nf_ct_protonum(ct) == IPPROTO_GRE))
 		destroy_gre_conntrack(ct);
 
-	local_bh_disable();
 	/* Expectations will have been removed in clean_from_lists,
 	 * except TFTP can create an expectation on the first packet,
 	 * before connection is in the list, so we need to clean here,
@@ -604,8 +603,6 @@ void nf_ct_destroy(struct nf_conntrack *nfct)
 	 */
 	nf_ct_remove_expectations(ct);
 
-	local_bh_enable();
-
 	if (ct->master)
 		nf_ct_put(ct->master);
 
Signature · 1 line
2.35.1
#1 lore raw
Quoted 3 lines · Florian Westphal

After commit
12b0b21dc2241 ("netfilter: conntrack: remove unconfirmed list") the extra local_bh disable/enable pair is no longer needed.

Squashed into original commit.

Quoted 29 lines
---
 net/netfilter/nf_conntrack_core.c | 3 ---
 1 file changed, 3 deletions(-)
net/netfilter/nf_conntrack_core.c +0 -3
index 0db9c5c94b5b..082a2fd8d85b 100644
@@ -596,7 +596,6 @@ void nf_ct_destroy(struct nf_conntrack *nfct)
 	if (unlikely(nf_ct_protonum(ct) == IPPROTO_GRE))
 		destroy_gre_conntrack(ct);
 
-	local_bh_disable();
 	/* Expectations will have been removed in clean_from_lists,
 	 * except TFTP can create an expectation on the first packet,
 	 * before connection is in the list, so we need to clean here,
@@ -604,8 +603,6 @@ void nf_ct_destroy(struct nf_conntrack *nfct)
 	 */
 	nf_ct_remove_expectations(ct);
 
-	local_bh_enable();
-
 	if (ct->master)
 		nf_ct_put(ct->master);
 
Signature · 1 line
2.35.1