Messages in this thread | | | Date | Tue, 08 Sep 2020 20:12:40 -0700 (PDT) | Subject | Re: [PATCH net-next] rcu: prevent RCU_LOCKDEP_WARN() from swallowing the condition | From | David Miller <> |
| |
From: Jakub Kicinski <kuba@kernel.org> Date: Tue, 8 Sep 2020 10:36:24 -0700
> We run into a unused variable warning in bridge code when > variable is only used inside the condition of > rcu_dereference_protected(). > > #define mlock_dereference(X, br) \ > rcu_dereference_protected(X, lockdep_is_held(&br->multicast_lock)) > > Since on builds with CONFIG_PROVE_RCU=n rcu_dereference_protected() > compiles to nothing the compiler doesn't see the variable use. > > Prevent the warning by adding the condition as dead code. > We need to un-hide the declaration of lockdep_tasklist_lock_is_held() > and fix a bug the crept into a net/sched header. > > Signed-off-by: Jakub Kicinski <kuba@kernel.org>
I ended up applying Nikolay's fix, but this situation with the rcu macros needs to be addressed.
| |