Re: [PATCH bpf-next] bpf:syscall: Log error code on trampoline unlink failure
From: Leon Hwang
Date: Thu Jul 16 2026 - 00:59:43 EST
In subject, 'bpf:' is enough, 'syscall:' can be dropped.
On 16/7/26 11:34, xu.xin16@xxxxxxxxxx wrote:
> From: xu xin <xu.xin16@xxxxxxxxxx>
>
> Replace silent WARN_ON_ONCE with WARN_ONCE that prints the actual error
> code from bpf_trampoline_unlink_prog(). This aids debugging of race
> conditions during link teardown, while keeping the warning rate limited
> to avoid log flooding.
Have you tried to trace bpf_trampoline_unlink_prog() with fexit?
bpftrace -lv 'fexit:bpf_trampoline_unlink_prog'
kretfunc:vmlinux:bpf_trampoline_unlink_prog
struct bpf_tramp_node * node
struct bpf_trampoline * tr
struct bpf_prog * tgt_prog
int retval
Since bpf_trampoline_unlink_prog() can be traced with fexit, it seems
unnecessary for this change?
Thanks,
Leon
> [...]