Commit 6159b4a
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.
Reported-by: Dan Carpenter <dan.carpenter@linaro.org>
Closes: https://lore.kernel.org/bpf/85697a7e-f897-4f74-8b43-82721bebc462@kili.mountain/
Signed-off-by: Yafang Shao <laoar.shao@gmail.com>1 parent b0b2e68 commit 6159b4a
1 file changed
+5
-5
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3376 | 3376 | | |
3377 | 3377 | | |
3378 | 3378 | | |
3379 | | - | |
3380 | | - | |
3381 | | - | |
3382 | | - | |
3383 | | - | |
3384 | 3379 | | |
3385 | 3380 | | |
3386 | 3381 | | |
3387 | 3382 | | |
3388 | 3383 | | |
| 3384 | + | |
| 3385 | + | |
| 3386 | + | |
| 3387 | + | |
| 3388 | + | |
3389 | 3389 | | |
3390 | 3390 | | |
3391 | 3391 | | |
| |||
0 commit comments