tracing: Fix synthetic event to accept unsigned modifier
authorMasami Hiramatsu <mhiramat@kernel.org>
Thu, 18 Oct 2018 13:12:05 +0000 (22:12 +0900)
committerSteven Rostedt (VMware) <rostedt@goodmis.org>
Fri, 19 Oct 2018 21:25:11 +0000 (17:25 -0400)
commit282447ba6b00c64678ffdf964f44e5c8b1c68377
tree714c828c90e180455a59524f44688f860ba25d62
parent12ad0cb2123aed30241a14792ef5bef9efcccbcd
tracing: Fix synthetic event to accept unsigned modifier

Fix synthetic event to accept unsigned modifier for its field type
correctly.

Currently, synthetic_events interface returns error for "unsigned"
modifiers as below;

 # echo "myevent unsigned long var" >> synthetic_events
 sh: write error: Invalid argument

This is because argv_split() breaks "unsigned long" into "unsigned"
and "long", but parse_synth_field() doesn't expected it.

With this fix, synthetic_events can handle the "unsigned long"
correctly like as below;

 # echo "myevent unsigned long var" >> synthetic_events
 # cat synthetic_events
 myevent unsigned long var

Link: http://lkml.kernel.org/r/153986832571.18251.8448135724590496531.stgit@devbox
Cc: Shuah Khan <shuah@kernel.org>
Cc: Tom Zanussi <tom.zanussi@linux.intel.com>
Cc: stable@vger.kernel.org
Fixes: commit 4b147936fa50 ("tracing: Add support for 'synthetic' events")
Signed-off-by: Masami Hiramatsu <mhiramat@kernel.org>
Signed-off-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
kernel/trace/trace_events_hist.c