mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Steven Rostedt <rostedt@goodmis.org>
To: John Kacur <jkacur@redhat.com>
Cc: Daniel Bristot de Oliveira <bristot@redhat.com>,
	LKML <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] trace-cmd: record crashes if -f is used before -e event.
Date: Fri, 15 Jul 2016 15:26:33 -0400	[thread overview]
Message-ID: <20160715152633.249ab195@gandalf.local.home> (raw)
In-Reply-To: <alpine.LFD.2.20.1511180056380.15730@riemann>

On Wed, 18 Nov 2015 00:57:14 +0100 (CET)
John Kacur <jkacur@redhat.com> wrote:

> On Mon, 20 Jul 2015, Daniel Bristot de Oliveira wrote:
> 
> > The trace-cmd record command is crashing if a -f filter is used before
> > a -e event.
> > 
> > The usage a -f before a -e is a command line error, and trace-cmd
> > record detects this error by checking if the last_event pointer is NULL.
> > 
> > However, the last_event is not initialized as NULL and this command line
> > error is not detected. Then, the last_event is used to save the filter
> > options and this causes a segmentation fault because last_event was not
> > initialized yet.
> > 
> > This problem is fixed by initializing last_event as NULL.
> > 
> > How-to reproduce:
> >   # trace-cmd record -f foo
> >   Segmentation fault
> > 
> > Expected output:
> >   # trace-cmd record -f foo
> >   filter must come after event
> > 
> > Signed-off-by: Daniel Bristot de Oliveira <bristot@redhat.com>
  
> Tested-by: John Kacur <jkacur@redhat.com>
> 
> Works well, please apply

Applied. Thanks!

-- Steve

      reply	other threads:[~2016-07-15 19:26 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-07-20 17:51 Daniel Bristot de Oliveira
2015-11-17 23:57 ` John Kacur
2016-07-15 19:26   ` Steven Rostedt [this message]

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=20160715152633.249ab195@gandalf.local.home \
    --to=rostedt@goodmis.org \
    --cc=bristot@redhat.com \
    --cc=jkacur@redhat.com \
    --cc=linux-kernel@vger.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®