Commit 9703dea
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]>
Acked-by: Jiri Olsa <[email protected]>1 parent a8f8691 commit 9703dea
1 file changed
+2
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3378 | 3378 | | |
3379 | 3379 | | |
3380 | 3380 | | |
3381 | | - | |
3382 | | - | |
3383 | 3381 | | |
3384 | 3382 | | |
3385 | 3383 | | |
3386 | 3384 | | |
3387 | 3385 | | |
3388 | 3386 | | |
| 3387 | + | |
| 3388 | + | |
3389 | 3389 | | |
3390 | 3390 | | |
3391 | 3391 | | |
| |||
0 commit comments