Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
bpf: Fix uninitialized symbol in bpf_perf_link_fill_kprobe()
The patch 1b715e1: "bpf: Support ->fill_link_info for perf_event" from Jul 9, 2023, leads to the following Smatch static checker warning: kernel/bpf/syscall.c:3416 bpf_perf_link_fill_kprobe() error: uninitialized symbol 'type'. That can happens when uname is NULL. So fix it by verifying the uname when we really need to fill it. Fixes: 1b715e1 ("bpf: Support ->fill_link_info for perf_event") Reported-by: Dan Carpenter <[email protected]> Closes: https://lore.kernel.org/bpf/[email protected]/ Signed-off-by: Yafang Shao <[email protected]> Acked-by: Yonghong Song <[email protected]>
- Loading branch information