Skip to content

Commit 19a318e

Browse files
committed
netfilter: br_netfilter: remove WARN traps
JIRA: https://issues.redhat.com/browse/RHEL-36872 Upstream Status: RHEL only Those WARNs are appropriate for upstream, but not for RHEL. The commit that added them does not add anything that would increase likelyhood of triggering those conditions. Before commit mentioned in fixes tag we would always race silently. Previous patch indicates there other scenarios where we could encounter unconfirmed nf_conn with refcount > 2, which can be unsafe/racy. Upstream kernel should splat so we can further refine these workarounds, but thats not desirable for RHEL. This change should not be ported to versions other than RHEL9-y-stream. Signed-off-by: Florian Westphal <fwestpha@redhat.com>
1 parent 455107a commit 19a318e

File tree

1 file changed

+0
-6
lines changed

1 file changed

+0
-6
lines changed

net/bridge/br_netfilter_hooks.c

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -618,9 +618,6 @@ static unsigned int br_nf_local_in(void *priv,
618618
if (likely(nf_ct_is_confirmed(ct)))
619619
return NF_ACCEPT;
620620

621-
WARN_ON_ONCE(skb_shared(skb));
622-
WARN_ON_ONCE(refcount_read(&nfct->use) != 1);
623-
624621
/* We can't call nf_confirm here, it would create a dependency
625622
* on nf_conntrack module.
626623
*/
@@ -641,9 +638,6 @@ static unsigned int br_nf_local_in(void *priv,
641638
break;
642639
}
643640

644-
ct = container_of(nfct, struct nf_conn, ct_general);
645-
WARN_ON_ONCE(!nf_ct_is_confirmed(ct));
646-
647641
return ret;
648642
}
649643
#endif

0 commit comments

Comments
 (0)