mirror of
https://github.com/torvalds/linux.git
synced 2026-04-24 09:35:52 -04:00
Commitc27cea4416("rcu: Re-implement RCU Tasks Trace in terms of SRCU-fast") broke map_kptr selftest since it removed the function we were kprobing. Use a new kfunc that invokes call_rcu_tasks_trace and sets a program provided pointer to an integer to 1. Technically this can be unsafe if the memory being written to from the callback disappears, but this is just for usage in a test where we ensure we spin until we see the value to be set to 1, so it's ok. Reported-by: Shung-Hsi Yu <shung-hsi.yu@suse.com> Fixes:c27cea4416("rcu: Re-implement RCU Tasks Trace in terms of SRCU-fast") Signed-off-by: Kumar Kartikeya Dwivedi <memxor@gmail.com> Link: https://lore.kernel.org/r/20260211185747.3630539-1-memxor@gmail.com Signed-off-by: Alexei Starovoitov <ast@kernel.org>
15 lines
296 B
C
15 lines
296 B
C
// SPDX-License-Identifier: GPL-2.0
|
|
#include <vmlinux.h>
|
|
#include <bpf/bpf_helpers.h>
|
|
#include "../test_kmods/bpf_testmod_kfunc.h"
|
|
|
|
int done;
|
|
|
|
SEC("syscall")
|
|
int call_rcu_tasks_trace(void *ctx)
|
|
{
|
|
return bpf_kfunc_call_test_call_rcu_tasks_trace(&done);
|
|
}
|
|
|
|
char _license[] SEC("license") = "GPL";
|