Toke Høiland-Jørgensen 694cea395f bpf: Allow RCU-protected lookups to happen from bh context
XDP programs are called from a NAPI poll context, which means the RCU
reference liveness is ensured by local_bh_disable(). Add
rcu_read_lock_bh_held() as a condition to the RCU checks for map lookups so
lockdep understands that the dereferences are safe from inside *either* an
rcu_read_lock() section *or* a local_bh_disable() section. While both
bh_disabled and rcu_read_lock() provide RCU protection, they are
semantically distinct, so we need both conditions to prevent lockdep
complaints.

This change is done in preparation for removing the redundant
rcu_read_lock()s from drivers.

Signed-off-by: Toke Høiland-Jørgensen <toke@redhat.com>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Acked-by: Martin KaFai Lau <kafai@fb.com>
Link: https://lore.kernel.org/bpf/20210624160609.292325-5-toke@redhat.com
2021-06-24 19:41:15 +02:00
..
2021-05-24 12:45:26 -04:00
2021-04-27 18:09:44 -07:00
2021-04-26 09:41:15 -07:00
2021-05-05 12:39:29 -07:00
2021-04-27 18:14:38 -07:00
2021-04-08 19:37:21 +02:00
2021-03-24 12:11:48 -04:00
2021-04-27 13:50:58 -07:00
2021-04-08 16:04:20 -07:00
2021-05-06 19:24:11 -07:00
2021-05-06 19:24:13 -07:00
2021-05-07 00:26:33 -07:00
2020-12-14 16:40:27 -08:00
2020-11-14 11:26:04 -08:00
2020-12-17 13:01:31 -08:00
2020-12-14 16:40:27 -08:00
2020-07-27 14:31:12 -04:00
2020-12-01 10:30:28 +00:00
2021-01-22 15:09:42 +01:00
2021-04-28 12:00:13 -07:00
2021-05-07 00:26:34 -07:00
2021-02-09 12:27:29 -05:00
2021-05-07 00:26:34 -07:00
2020-08-19 14:14:12 +02:00
2020-08-19 14:13:20 +02:00