linux-trace-devel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Tzvetomir Stoyanov <tstoyanov@vmware.com>
To: "rostedt@goodmis.org" <rostedt@goodmis.org>
Cc: "linux-trace-devel@vger.kernel.org" <linux-trace-devel@vger.kernel.org>
Subject: [PATCH 2/5] fix "trace-cmd reset -a -d" segfault
Date: Thu, 13 Dec 2018 14:21:40 +0000	[thread overview]
Message-ID: <20181213142125.12149-3-tstoyanov@vmware.com> (raw)
In-Reply-To: <20181213142125.12149-1-tstoyanov@vmware.com>

This patch fixes a segfault when "trace-cmd reset -a -d"
is executed and there is at least one ftrace instance created.

Signed-off-by: Tzvetomir Stoyanov <tstoyanov@vmware.com>
---
 tracecmd/trace-record.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/tracecmd/trace-record.c b/tracecmd/trace-record.c
index a044cf5..e02660a 100644
--- a/tracecmd/trace-record.c
+++ b/tracecmd/trace-record.c
@@ -4432,14 +4432,14 @@ void trace_reset(int argc, char **argv)
 		case 'a':
 			last_specified_all = 1;
 			add_all_instances();
-			for_each_instance(instance) {
-				instance->flags |= BUFFER_FL_KEEP;
+			for_each_instance(inst) {
+				inst->flags |= BUFFER_FL_KEEP;
 			}
 			break;
 		case 'd':
 			if (last_specified_all) {
 				for_each_instance(inst) {
-					instance->flags &= ~BUFFER_FL_KEEP;
+					inst->flags &= ~BUFFER_FL_KEEP;
 				}
 			} else {
 				if (is_top_instance(instance))
-- 
2.19.2

  parent reply	other threads:[~2018-12-13 14:21 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-12-13 14:21 [PATCH 0/5] trace-cmd reset fixes Tzvetomir Stoyanov
2018-12-13 14:21 ` [PATCH 1/5] fix "trace-cmd reset" command to restore "tracng_on" Tzvetomir Stoyanov
2018-12-13 14:21 ` Tzvetomir Stoyanov [this message]
2018-12-13 14:21 ` [PATCH 3/5] fix "trace-cmd reset" command to restore default clock Tzvetomir Stoyanov
2018-12-13 14:21 ` [PATCH 4/5] fix "trace-cmd reset" command to restore the default value of set_event_pid Tzvetomir Stoyanov
2019-03-05 19:03   ` Steven Rostedt
2018-12-13 14:21 ` [PATCH 5/5] fix "trace-cmd reset" command to restore the default value of tracing_max_latency Tzvetomir Stoyanov
2019-03-05 19:06   ` Steven Rostedt
2019-03-05 13:24 ` [PATCH 0/5] trace-cmd reset fixes Slavomir Kaslev

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=20181213142125.12149-3-tstoyanov@vmware.com \
    --to=tstoyanov@vmware.com \
    --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).