From: Ingo Molnar Date: Mon, 12 May 2008 19:20:53 +0000 (+0200) Subject: ftrace: iter ctrl fix X-Git-Tag: firefly_0821_release~19697^2^2~1^2~82 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=442e544ce52d4415a024920b84fb95c5f9aa0855;p=firefly-linux-kernel-4.4.55.git ftrace: iter ctrl fix Signed-off-by: Ingo Molnar Signed-off-by: Thomas Gleixner --- diff --git a/kernel/trace/trace.c b/kernel/trace/trace.c index 3ae17e254fc3..688b4cf72d99 100644 --- a/kernel/trace/trace.c +++ b/kernel/trace/trace.c @@ -1920,6 +1920,11 @@ tracing_iter_ctrl_write(struct file *filp, const char __user *ubuf, break; } } + /* + * If no option could be set, return an error: + */ + if (!trace_options[i]) + return -EINVAL; filp->f_pos += cnt;