diff options
| author | 2026-06-05 13:20:53 -0700 | |
|---|---|---|
| committer | 2026-06-05 14:18:20 -0700 | |
| commit | 73d475dc6c13177fce0d9d892bff33299c8ad56a (patch) | |
| tree | 4bca9ba9aa990a6aaa803b2b899fda01d46040be /tools/lib/python/kdoc/python_version.py | |
| parent | bpf: Fix dead error check on acquire_reference() in check_kfunc_call (diff) | |
bpf: Check acquire_reference() error for "__ref" struct_ops arguments
When acquiring references for struct_ops program arguments tagged with
"__ref", the return value of acquire_reference() was stored directly
into u32 ctx_arg_info[i].ref_id without checking for failure.
acquire_reference() returns -ENOMEM when acquire_reference_state() fails
to allocate, so the error was silently stored as a ref_id instead of
aborting verification. Fix it by checking the return.
Fixes: a687df2008f6 ("bpf: Support getting referenced kptr from struct_ops argument")
Signed-off-by: Amery Hung <ameryhung@gmail.com>
Link: https://lore.kernel.org/r/20260605202056.1780352-3-ameryhung@gmail.com
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Diffstat (limited to 'tools/lib/python/kdoc/python_version.py')
0 files changed, 0 insertions, 0 deletions
