All of lore.kernel.org
 help / color / mirror / Atom feed
From: Daniel Bristot de Oliveira <bristot@kernel.org>
To: Wan Jiabing <wanjiabing@vivo.com>
Cc: kael_w@qq.com, Steven Rostedt <rostedt@goodmis.org>,
	linux-trace-devel@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] rtla/osnoise: fix NULL but dereferenced coccicheck errors
Date: Thu, 31 Mar 2022 14:25:45 +0200	[thread overview]
Message-ID: <2afd6cba-1a01-0c32-eae8-c4f9f7e76732@kernel.org> (raw)
In-Reply-To: <20220322113253.57390-1-wanjiabing@vivo.com>

Hi Wan

On 3/22/22 12:32, Wan Jiabing wrote:
> Fix the following coccicheck errors:
> ./tools/tracing/rtla/src/osnoise_hist.c:870:31-36: ERROR: record is NULL but dereferenced.
> ./tools/tracing/rtla/src/osnoise_top.c:650:31-36: ERROR: record is NULL but dereferenced.
> 
> "record" is NULL before calling osnoise_init_trace_tool.
> Add a tag "out_free" to avoid dereferring a NULL pointer.

Yes, I see the problem.

Please, change the Subject to something with better information about the
problem, instead of the way you fund it.


> Fixes: 51d64c3a1819 ("rtla: Add -e/--event support")
> Signed-off-by: Wan Jiabing <wanjiabing@vivo.com>
> ---
>  tools/tracing/rtla/src/osnoise_hist.c | 5 +++--
>  tools/tracing/rtla/src/osnoise_top.c  | 9 +++++----
>  2 files changed, 8 insertions(+), 6 deletions(-)

Please, also add the version of coccicheck you are using, because it seems that
there is a problem with it. There is a similar problem with timerlat, added by
the same patch, but it seems that coccicheck did not find it.

Would you mind to check coccicheck, and also add the fix for timerlat?

Thanks.
-- Daniel


  reply	other threads:[~2022-03-31 12:25 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-03-22 11:32 [PATCH] rtla/osnoise: fix NULL but dereferenced coccicheck errors Wan Jiabing
2022-03-31 12:25 ` Daniel Bristot de Oliveira [this message]
2022-04-01  2:04   ` Jiabing Wan

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=2afd6cba-1a01-0c32-eae8-c4f9f7e76732@kernel.org \
    --to=bristot@kernel.org \
    --cc=kael_w@qq.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-trace-devel@vger.kernel.org \
    --cc=rostedt@goodmis.org \
    --cc=wanjiabing@vivo.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.