net, core: Allow netdev_lower_get_next_private_rcu in bh context
For the XDP bonding slave lookup to work in the NAPI poll context in which
the redudant rcu_read_lock() has been removed we have to follow the same
approach as in 694cea395f
("bpf: Allow RCU-protected lookups to happen
from bh context") and modify the WARN_ON to also check rcu_read_lock_bh_held().
Signed-off-by: Jussi Maki <joamaki@gmail.com>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Cc: Toke Høiland-Jørgensen <toke@redhat.com>
Link: https://lore.kernel.org/bpf/20210731055738.16820-6-joamaki@gmail.com
This commit is contained in:
parent
aeea1b86f9
commit
6891866999
|
@ -7615,7 +7615,7 @@ void *netdev_lower_get_next_private_rcu(struct net_device *dev,
|
|||
{
|
||||
struct netdev_adjacent *lower;
|
||||
|
||||
WARN_ON_ONCE(!rcu_read_lock_held());
|
||||
WARN_ON_ONCE(!rcu_read_lock_held() && !rcu_read_lock_bh_held());
|
||||
|
||||
lower = list_entry_rcu((*iter)->next, struct netdev_adjacent, list);
|
||||
|
||||
|
|
Loading…
Reference in New Issue