From: Florian Westphal <fw@strlen.de>
To: Pablo Neira Ayuso <pablo@netfilter.org>
Cc: syzbot <syzbot+ff16b505ec9152e5f448@syzkaller.appspotmail.com>,
coreteam@netfilter.org, davem@davemloft.net, edumazet@google.com,
horms@kernel.org, kadlec@netfilter.org, kuba@kernel.org,
linux-kernel@vger.kernel.org, netdev@vger.kernel.org,
netfilter-devel@vger.kernel.org, pabeni@redhat.com, phil@nwl.cc,
syzkaller-bugs@googlegroups.com
Subject: Re: [syzbot] [netfilter?] possible deadlock in nf_tables_dumpreset_obj
Date: Mon, 22 Dec 2025 12:16:14 +0100 [thread overview]
Message-ID: <aUkofscPurmzJ0Sh@strlen.de> (raw)
In-Reply-To: <aUkPz0extqKuB7Bl@chamomile>
Pablo Neira Ayuso <pablo@netfilter.org> wrote:
> > > CPU0: 'nft reset'.
> > > CPU1: 'ipset list' (anything in ipset doing a netlink dump op)
> > > CPU2: 'iptables-nft -A ... -m set ...'
> > >
> > > ... can result in:
> > >
> > > CPU0 CPU1 CPU2
> > > ---- ---- ----
> > > lock(nlk_cb_mutex-NETFILTER);
> > > lock(nfnl_subsys_ipset);
> > > lock(&nft_net->commit_mutex);
> > > lock(nlk_cb_mutex-NETFILTER);
> > > lock(nfnl_subsys_ipset);
> > > lock(&nft_net->commit_mutex);
>
> Would it work to use a separated mutex for reset itself?
I think so, yes, its only job is to prevent concurrent reset actions,
the objects themselves are protected by rcu.
Parallel add/removal should be fine.
next prev parent reply other threads:[~2025-12-22 11:16 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-12-20 0:58 [syzbot] [netfilter?] possible deadlock in nf_tables_dumpreset_obj syzbot
2025-12-21 23:16 ` Florian Westphal
2025-12-22 9:21 ` Pablo Neira Ayuso
2025-12-22 9:30 ` Pablo Neira Ayuso
2025-12-22 11:16 ` Florian Westphal [this message]
2025-12-23 12:32 ` Jozsef Kadlecsik
2025-12-23 13:14 ` Florian Westphal
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=aUkofscPurmzJ0Sh@strlen.de \
--to=fw@strlen.de \
--cc=coreteam@netfilter.org \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=horms@kernel.org \
--cc=kadlec@netfilter.org \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=netfilter-devel@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=pablo@netfilter.org \
--cc=phil@nwl.cc \
--cc=syzbot+ff16b505ec9152e5f448@syzkaller.appspotmail.com \
--cc=syzkaller-bugs@googlegroups.com \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).