Allow using rqspinlock in tracing programs, since it is safe to acquire from any context. This permits its stress testing from any context using BPF programs. Signed-off-by: Kumar Kartikeya Dwivedi --- kernel/bpf/verifier.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/kernel/bpf/verifier.c b/kernel/bpf/verifier.c index 4acd8e848c88..fee92ff348a9 100644 --- a/kernel/bpf/verifier.c +++ b/kernel/bpf/verifier.c @@ -21542,7 +21542,8 @@ static int check_map_prog_compatibility(struct bpf_verifier_env *env, return -EINVAL; } - if (is_tracing_prog_type(prog_type)) { + if (is_tracing_prog_type(prog_type) && + btf_record_has_field(map->record, BPF_SPIN_LOCK)) { verbose(env, "tracing progs cannot use bpf_spin_lock yet\n"); return -EINVAL; } -- 2.47.3