Re: Netfilter: suspicious RCU usage in __nft_rule_lookup

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

On Thu, Oct 24, 2024 at 06:56:43PM +0200, Matthieu Baerts wrote:
> Hello,
> 
> First, thank you for all the work you did and are still doing around
> Netfilter!
> 
> I'm writing you this email, because when I run the MPTCP test suite with
> a VM running a kernel built with a debug config including
> CONFIG_PROVE_RCU_LIST=y (and CONFIG_RCU_EXPERT=y), I get the following
> warning:
> 
> 
> > =============================
> > WARNING: suspicious RCU usage
> > 6.12.0-rc3+ #7 Not tainted
> > -----------------------------
> > net/netfilter/nf_tables_api.c:3420 RCU-list traversed in non-reader section!!
> > 
> > other info that might help us debug this:
> > 
> > 
> > rcu_scheduler_active = 2, debug_locks = 1
> > 1 lock held by iptables/134:
> >   #0: ffff888008c4fcc8 (&nft_net->commit_mutex){+.+.}-{3:3}, at: nf_tables_valid_genid (include/linux/jiffies.h:101) nf_tables
> > 
> > stack backtrace:
> > CPU: 1 UID: 0 PID: 134 Comm: iptables Not tainted 6.12.0-rc3+ #7
> > Hardware name: Bochs Bochs, BIOS Bochs 01/01/2011
> > Call Trace:
> >  <TASK>
> >  dump_stack_lvl (lib/dump_stack.c:123)
> >  lockdep_rcu_suspicious (kernel/locking/lockdep.c:6822)
> >  __nft_rule_lookup (net/netfilter/nf_tables_api.c:3420 (discriminator 7)) nf_tables

This is a _rcu notation which is not correct, while mutex is held, it
was introduced here:

d9adf22a2918 ("netfilter: nf_tables: use call_rcu in netlink dumps")

I will post a patch, thanks for your report.




[Index of Archives]     [Netfitler Users]     [Berkeley Packet Filter]     [LARTC]     [Bugtraq]     [Yosemite Forum]

  Powered by Linux