This is a note to let you know that I've just added the patch titled tracing: Fix synthetic event to allow semicolon at end to the 4.18-stable tree which can be found at: http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary The filename of the patch is: tracing-fix-synthetic-event-to-allow-semicolon-at-end.patch and it can be found in the queue-4.18 subdirectory. If you, or anyone else, feels it should not be added to the stable tree, please let <stable@xxxxxxxxxxxxxxx> know about it. >From a360d9e4016c1fcf41553b37ad496870dc5723d0 Mon Sep 17 00:00:00 2001 From: Masami Hiramatsu <mhiramat@xxxxxxxxxx> Date: Thu, 18 Oct 2018 22:12:34 +0900 Subject: tracing: Fix synthetic event to allow semicolon at end From: Masami Hiramatsu <mhiramat@xxxxxxxxxx> commit a360d9e4016c1fcf41553b37ad496870dc5723d0 upstream. Fix synthetic event to allow independent semicolon at end. The synthetic_events interface accepts a semicolon after the last word if there is no space. # echo "myevent u64 var;" >> synthetic_events But if there is a space, it returns an error. # echo "myevent u64 var ;" > synthetic_events sh: write error: Invalid argument This behavior is difficult for users to understand. Let's allow the last independent semicolon too. Link: http://lkml.kernel.org/r/153986835420.18251.2191216690677025744.stgit@devbox Cc: Shuah Khan <shuah@xxxxxxxxxx> Cc: Tom Zanussi <tom.zanussi@xxxxxxxxxxxxxxx> Cc: stable@xxxxxxxxxxxxxxx Fixes: commit 4b147936fa50 ("tracing: Add support for 'synthetic' events") Signed-off-by: Masami Hiramatsu <mhiramat@xxxxxxxxxx> Signed-off-by: Steven Rostedt (VMware) <rostedt@xxxxxxxxxxx> Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx> --- kernel/trace/trace_events_hist.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/kernel/trace/trace_events_hist.c +++ b/kernel/trace/trace_events_hist.c @@ -1097,7 +1097,7 @@ static int create_synth_event(int argc, i += consumed - 1; } - if (i < argc) { + if (i < argc && strcmp(argv[i], ";") != 0) { ret = -EINVAL; goto err; } Patches currently in stable-queue which might be from mhiramat@xxxxxxxxxx are queue-4.18/tracing-fix-synthetic-event-to-allow-semicolon-at-end.patch queue-4.18/tracing-fix-synthetic-event-to-accept-unsigned-modifier.patch