linux-trace-devel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Daniel Bristot de Oliveira <bristot@kernel.org>
To: Steven Rostedt <rostedt@goodmis.org>
Cc: linux-kernel@vger.kernel.org, linux-trace-devel@vger.kernel.org
Subject: Re: [PATCH 4/4] rtla/osnoise: Fix segmentation fault when failing to enable -t
Date: Fri, 4 Feb 2022 18:46:59 +0100	[thread overview]
Message-ID: <23e7889f-9bb4-f607-630f-6f8f0ef90d3d@kernel.org> (raw)
In-Reply-To: <20220204124426.54d82ce2@gandalf.local.home>

On 2/4/22 18:44, Steven Rostedt wrote:
> On Fri,  4 Feb 2022 17:24:05 +0100
> Daniel Bristot de Oliveira <bristot@kernel.org> wrote:
> 
>> --- a/tools/tracing/rtla/src/osnoise.c
>> +++ b/tools/tracing/rtla/src/osnoise.c
>> @@ -750,6 +750,9 @@ void osnoise_put_context(struct osnoise_context *context)
>>   */
>>  void osnoise_destroy_tool(struct osnoise_tool *top)
>>  {
>> +	if (!top)
>> +		return;
>> +
>>  	trace_instance_destroy(&top->trace);
>>  
>>  	if (top->context)
> Um, don't you still need to initialize everything to NULL?
> 
> i.e.
> 
> nt osnoise_top_main(int argc, char **argv)
> {
>         struct osnoise_top_params *params;
>         struct trace_instance *trace;
>         struct osnoise_tool *record;
>         struct osnoise_tool *tool;
>         int return_value = 1;
>         int retval;
> 
> 
> 
> Does not guarantee that record and tool will be initialized to NULL.

Aaarrrg, you're right.

As this is not related to the other patches, could you just ignore this one, so
I can re-send alone?

-- Daniel

  reply	other threads:[~2022-02-04 17:49 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-02-04 16:24 [PATCH 0/4] Some RTLA fixes Daniel Bristot de Oliveira
2022-02-04 16:24 ` [PATCH 1/4] rtla: Follow kernel version Daniel Bristot de Oliveira
2022-02-04 16:24 ` [PATCH 2/4] rtla/utils: Fix session duration parsing Daniel Bristot de Oliveira
2022-02-04 16:24 ` [PATCH 3/4] rtla/trace: Error message fixup Daniel Bristot de Oliveira
2022-02-04 17:42   ` Steven Rostedt
2022-02-04 16:24 ` [PATCH 4/4] rtla/osnoise: Fix segmentation fault when failing to enable -t Daniel Bristot de Oliveira
2022-02-04 17:44   ` Steven Rostedt
2022-02-04 17:46     ` Daniel Bristot de Oliveira [this message]
2022-02-04 18:15       ` Steven Rostedt

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=23e7889f-9bb4-f607-630f-6f8f0ef90d3d@kernel.org \
    --to=bristot@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-trace-devel@vger.kernel.org \
    --cc=rostedt@goodmis.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;
as well as URLs for NNTP newsgroup(s).