Commit 78f520b
net: Use nested-BH locking for bpf_scratchpad.
bpf_scratchpad is a per-CPU variable and relies on disabled BH for its
locking. Without per-CPU locking in local_bh_disable() on PREEMPT_RT
this data structure requires explicit locking.
Add a local_lock_t to the data structure and use local_lock_nested_bh()
for locking. This change adds only lockdep coverage and does not alter
the functional behaviour for !PREEMPT_RT.
Cc: Alexei Starovoitov <ast@kernel.org>
Cc: Andrii Nakryiko <andrii@kernel.org>
Cc: Hao Luo <haoluo@google.com>
Cc: Jiri Olsa <jolsa@kernel.org>
Cc: John Fastabend <john.fastabend@gmail.com>
Cc: KP Singh <kpsingh@kernel.org>
Cc: Martin KaFai Lau <martin.lau@linux.dev>
Cc: Song Liu <song@kernel.org>
Cc: Stanislav Fomichev <sdf@google.com>
Cc: Yonghong Song <yonghong.song@linux.dev>
Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Link: https://patch.msgid.link/20240620132727.660738-14-bigeasy@linutronix.de
Signed-off-by: Jakub Kicinski <kuba@kernel.org>1 parent d1542d4 commit 78f520b
1 file changed
+9
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1658 | 1658 | | |
1659 | 1659 | | |
1660 | 1660 | | |
| 1661 | + | |
1661 | 1662 | | |
1662 | 1663 | | |
1663 | | - | |
| 1664 | + | |
| 1665 | + | |
| 1666 | + | |
1664 | 1667 | | |
1665 | 1668 | | |
1666 | 1669 | | |
| |||
2021 | 2024 | | |
2022 | 2025 | | |
2023 | 2026 | | |
| 2027 | + | |
2024 | 2028 | | |
2025 | 2029 | | |
2026 | 2030 | | |
| |||
2034 | 2038 | | |
2035 | 2039 | | |
2036 | 2040 | | |
| 2041 | + | |
2037 | 2042 | | |
2038 | 2043 | | |
2039 | 2044 | | |
2040 | 2045 | | |
2041 | 2046 | | |
2042 | | - | |
| 2047 | + | |
| 2048 | + | |
| 2049 | + | |
2043 | 2050 | | |
2044 | 2051 | | |
2045 | 2052 | | |
| |||
0 commit comments