diff options
author | 2021-06-24 18:05:54 +0200 | |
---|---|---|
committer | 2021-06-24 19:41:15 +0200 | |
commit | 694cea395fded425008e93cd90cfdf7a451674af (patch) | |
tree | be068946c3b7fd801c7d8854947c4d090de9896b /tools/perf/scripts/python/export-to-postgresql.py | |
parent | doc: Give XDP as example of non-obvious RCU reader/updater pairing (diff) | |
download | linux-dev-694cea395fded425008e93cd90cfdf7a451674af.tar.xz linux-dev-694cea395fded425008e93cd90cfdf7a451674af.zip |
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
Diffstat (limited to 'tools/perf/scripts/python/export-to-postgresql.py')
0 files changed, 0 insertions, 0 deletions