From: "Gustavo A. R. Silva" <gustavo@embeddedor.com>
To: Tom Zanussi <zanussi@kernel.org>,
"Steven Rostedt (VMware)" <rostedt@goodmis.org>,
Ingo Molnar <mingo@redhat.com>,
Masami Hiramatsu <mhiramat@kernel.org>
Cc: linux-kernel@vger.kernel.org
Subject: Re: [PATCH][next] tracing/kprobe: Fix uninitialized variable bug
Date: Wed, 5 Feb 2020 17:32:08 -0600 [thread overview]
Message-ID: <a6d7de7b-607c-2045-4cf1-f3b2e522c8b0@embeddedor.com> (raw)
In-Reply-To: <1580945088.2032.2.camel@kernel.org>
On 2/5/20 17:24, Tom Zanussi wrote:
> Hi Gustavo,
>
Hey Tom,
> On Wed, 2020-02-05 at 16:34 -0600, Gustavo A. R. Silva wrote:
>> There is a potential execution path in which variable *ret* is
>> returned
>> without being properly initialized, previously.
>>
>> Fix this by initializing variable *ret* to 0.
>>
>
> Good catch. Thanks for fixing this!
>
Glad to help. :)
> Reviewed-by: Tom Zanussi <zanussi@kernel.org>
>
Thanks
--
Gustavo
>
>
>> Addresses-Coverity-ID: 1491142 ("Uninitialized scalar variable")
>> Fixes: 2a588dd1d5d6 ("tracing: Add kprobe event command generation
>> functions")
>> Signed-off-by: Gustavo A. R. Silva <gustavo@embeddedor.com>
>> ---
>> kernel/trace/trace_kprobe.c | 2 +-
>> 1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/kernel/trace/trace_kprobe.c
>> b/kernel/trace/trace_kprobe.c
>> index d8264ebb9581..362cca52f5de 100644
>> --- a/kernel/trace/trace_kprobe.c
>> +++ b/kernel/trace/trace_kprobe.c
>> @@ -1012,7 +1012,7 @@ int __kprobe_event_add_fields(struct
>> dynevent_cmd *cmd, ...)
>> {
>> struct dynevent_arg arg;
>> va_list args;
>> - int ret;
>> + int ret = 0;
>>
>> if (cmd->type != DYNEVENT_TYPE_KPROBE)
>> return -EINVAL;
next prev parent reply other threads:[~2020-02-05 23:29 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-02-05 22:34 Gustavo A. R. Silva
2020-02-05 23:24 ` Tom Zanussi
2020-02-05 23:32 ` Gustavo A. R. Silva [this message]
2020-02-05 23:45 ` Masami Hiramatsu
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=a6d7de7b-607c-2045-4cf1-f3b2e522c8b0@embeddedor.com \
--to=gustavo@embeddedor.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mhiramat@kernel.org \
--cc=mingo@redhat.com \
--cc=rostedt@goodmis.org \
--cc=zanussi@kernel.org \
/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
all inboxes | Powered by JetHome®