All the mail mirrored from lore.kernel.org
 help / color / mirror / Atom feed
From: Pablo Neira Ayuso <pablo@netfilter.org>
To: Jianbo Liu <jianbol@nvidia.com>
Cc: "fw@strlen.de" <fw@strlen.de>,
	"netfilter-devel@vger.kernel.org"
	<netfilter-devel@vger.kernel.org>,
	"davem@davemloft.net" <davem@davemloft.net>,
	"netdev@vger.kernel.org" <netdev@vger.kernel.org>
Subject: Re: [BUG] kernel warning from br_nf_local_in+0x157/0x180
Date: Fri, 22 Mar 2024 13:27:46 +0100	[thread overview]
Message-ID: <Zf15Ni8CuRLNnBAJ@calendula> (raw)
In-Reply-To: <ac03a9ba41e130123cd680be6df9f30be95d0f98.camel@nvidia.com>

[-- Attachment #1: Type: text/plain, Size: 280 bytes --]

Hi Jianbo,

On Mon, Mar 18, 2024 at 09:41:46AM +0000, Jianbo Liu wrote:
> Hi Florian and Pablo,
> 
> We hit the following warning from br_nf_local_in+0x157/0x180.

Can you give a try to this patch?

This fix is not yet complete but it should fix the splat for this
test.

Thanks.

[-- Attachment #2: x.patch --]
[-- Type: text/x-diff, Size: 568 bytes --]

diff --git a/net/bridge/br_netfilter_hooks.c b/net/bridge/br_netfilter_hooks.c
index 35e10c5a766d..085d3f751b3f 100644
--- a/net/bridge/br_netfilter_hooks.c
+++ b/net/bridge/br_netfilter_hooks.c
@@ -612,6 +612,13 @@ static unsigned int br_nf_local_in(void *priv,
 	if (likely(nf_ct_is_confirmed(ct)))
 		return NF_ACCEPT;
 
+	if (skb->pkt_type != PACKET_BROADCAST &&
+	    skb->pkt_type != PACKET_MULTICAST) {
+		skb->_nfct = 0ul;
+		nf_conntrack_put(nfct);
+		return NF_ACCEPT;
+	}
+
 	WARN_ON_ONCE(skb_shared(skb));
 	WARN_ON_ONCE(refcount_read(&nfct->use) != 1);
 

  parent reply	other threads:[~2024-03-22 12:27 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-03-18  9:41 [BUG] kernel warning from br_nf_local_in+0x157/0x180 Jianbo Liu
2024-03-18 14:19 ` Florian Westphal
2024-03-22 12:27 ` Pablo Neira Ayuso [this message]
2024-03-23 10:37   ` Jianbo Liu
2024-03-26  1:28     ` Pablo Neira Ayuso
2024-04-01  9:39       ` Jianbo Liu

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=Zf15Ni8CuRLNnBAJ@calendula \
    --to=pablo@netfilter.org \
    --cc=davem@davemloft.net \
    --cc=fw@strlen.de \
    --cc=jianbol@nvidia.com \
    --cc=netdev@vger.kernel.org \
    --cc=netfilter-devel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.