From: Yonghong Song <yonghong.song@linux.dev>
To: Yafang Shao <laoar.shao@gmail.com>,
ast@kernel.org, daniel@iogearbox.net, john.fastabend@gmail.com,
andrii@kernel.org, martin.lau@linux.dev, song@kernel.org,
yhs@fb.com, kpsingh@kernel.org, sdf@google.com,
haoluo@google.com, jolsa@kernel.org
Cc: bpf@vger.kernel.org, Dan Carpenter <dan.carpenter@linaro.org>
Subject: Re: [PATCH v3 bpf-next 1/2] bpf: Fix uninitialized symbol in bpf_perf_link_fill_kprobe()
Date: Wed, 2 Aug 2023 14:51:41 -0700 [thread overview]
Message-ID: <efcd5b6e-d1a5-b63c-897f-411dccb4baae@linux.dev> (raw)
In-Reply-To: <20230731111313.3745-2-laoar.shao@gmail.com>
On 7/31/23 4:13 AM, Yafang Shao wrote:
> The patch 1b715e1b0ec5: "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: 1b715e1b0ec5 ("bpf: Support ->fill_link_info for perf_event")
> 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>
Acked-by: Yonghong Song <yonghong.song@linux.dev>
next prev parent reply other threads:[~2023-08-02 21:51 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-07-31 11:13 [PATCH v3 bpf-next 0/2] bpf: Fix fill_link_info and add selftest Yafang Shao
2023-07-31 11:13 ` [PATCH v3 bpf-next 1/2] bpf: Fix uninitialized symbol in bpf_perf_link_fill_kprobe() Yafang Shao
2023-08-02 21:51 ` Yonghong Song [this message]
2023-07-31 11:13 ` [PATCH v3 bpf-next 2/2] selftests/bpf: Add selftest for fill_link_info Yafang Shao
2023-08-02 20:57 ` Alexei Starovoitov
2023-08-03 14:28 ` Yafang Shao
2023-08-02 23:00 ` Yonghong Song
2023-08-03 14:32 ` Yafang Shao
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=efcd5b6e-d1a5-b63c-897f-411dccb4baae@linux.dev \
--to=yonghong.song@linux.dev \
--cc=andrii@kernel.org \
--cc=ast@kernel.org \
--cc=bpf@vger.kernel.org \
--cc=dan.carpenter@linaro.org \
--cc=daniel@iogearbox.net \
--cc=haoluo@google.com \
--cc=john.fastabend@gmail.com \
--cc=jolsa@kernel.org \
--cc=kpsingh@kernel.org \
--cc=laoar.shao@gmail.com \
--cc=martin.lau@linux.dev \
--cc=sdf@google.com \
--cc=song@kernel.org \
--cc=yhs@fb.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox