Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Squash to "bpf: Add bpf_mptcp_sched_ops"
Similar to the previous commit, this splat can be seen: ============================= WARNING: suspicious RCU usage 6.12.0-rc2+ #1 Tainted: G OE ----------------------------- net/mptcp/sched.c:44 RCU-list traversed in non-reader section!! other info that might help us debug this: rcu_scheduler_active = 2, debug_locks = 1 1 lock held by test_progs/323: ffff888007e16a40 (&st_map->lock){+.+.}-{3:3}, at: bpf_struct_ops_map_update_elem (kernel/bpf/bpf_struct_ops.c:632) stack backtrace: CPU: 0 UID: 0 PID: 323 Comm: test_progs Tainted: G OE 6.12.0-rc2+ #1 Tainted: [O]=OOT_MODULE, [E]=UNSIGNED_MODULE Hardware name: Bochs Bochs, BIOS Bochs 01/01/2011 Call Trace: <TASK> dump_stack_lvl (lib/dump_stack.c:123) lockdep_rcu_suspicious (kernel/locking/lockdep.c:6822) mptcp_sched_find (net/mptcp/sched.c:44 (discriminator 7)) bpf_mptcp_sched_init_member (net/mptcp/bpf.c:128 net/mptcp/bpf.c:109) ? btf_type_resolve_ptr (include/linux/btf.h:252 kernel/bpf/btf.c:637) bpf_struct_ops_map_update_elem (kernel/bpf/bpf_struct_ops.c:658) ? __might_fault (mm/memory.c:6700 (discriminator 5) mm/memory.c:6693 (discriminator 5)) ? __pfx_bpf_struct_ops_map_update_elem (kernel/bpf/bpf_struct_ops.c:591) ? __pfx___might_resched (kernel/sched/core.c:8593) ? kasan_save_track (arch/x86/include/asm/current.h:49 (discriminator 1) mm/kasan/common.c:60 (discriminator 1) mm/kasan/common.c:69 (discriminator 1)) bpf_map_update_value (kernel/bpf/syscall.c:169) map_update_elem (kernel/bpf/syscall.c:1627) ? __pfx_map_update_elem (kernel/bpf/syscall.c:1586) __sys_bpf (kernel/bpf/syscall.c:5622) ? __pfx___sys_bpf (kernel/bpf/syscall.c:5596) __x64_sys_bpf (kernel/bpf/syscall.c:5739) ? lockdep_hardirqs_on_prepare (kernel/locking/lockdep.c:4347 kernel/locking/lockdep.c:4406) do_syscall_64 (arch/x86/entry/common.c:52 (discriminator 1) arch/x86/entry/common.c:83 (discriminator 1)) entry_SYSCALL_64_after_hwframe (arch/x86/entry/entry_64.S:130) Also similar to the previous commit, this can be fixed by adding the missing rcu_read_lock(). Signed-off-by: Matthieu Baerts (NGI0) <[email protected]>
- Loading branch information