[v2,1/2] trace-cmd: Reset CPU mask after setting it in trace-cmd record with option -M
diff mbox series

Message ID 20191001145740.8866-2-tz.stoyanov@gmail.com
State Accepted
Headers show
  • Reset CPU mask
Related show

Commit Message

Tzvetomir Stoyanov (VMware) Oct. 1, 2019, 2:57 p.m. UTC
When trace-cmd is run with option -M, to set the tracing cpumask, it was not reset
to its previous state. The trace-cmd record should put back the original value
after using -M for the tracing cpu masks.
Fixes https://bugzilla.kernel.org/show_bug.cgi?id=204941

Reported-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
Signed-off-by: Tzvetomir Stoyanov (VMware) <tz.stoyanov@gmail.com>
 tracecmd/trace-record.c | 1 +
 1 file changed, 1 insertion(+)

diff mbox series

diff --git a/tracecmd/trace-record.c b/tracecmd/trace-record.c
index 96d2c1a..69de82a 100644
--- a/tracecmd/trace-record.c
+++ b/tracecmd/trace-record.c
@@ -2403,6 +2403,7 @@  static void set_mask(struct buffer_instance *instance)
 	path = get_instance_file(instance, "tracing_cpumask");
 	if (!path)
 		die("could not allocate path");
+	reset_save_file(path, RESET_DEFAULT_PRIO);
 	ret = stat(path, &st);
 	if (ret < 0) {