From: Ingo Molnar Date: Mon, 12 May 2008 19:20:53 +0000 (+0200) Subject: ftrace: iter ctrl fix X-Git-Tag: v2.6.27-rc1~1102^2^2~1^2~82 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=442e544ce52d4415a024920b84fb95c5f9aa0855;p=linux-2.6 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 3ae17e254f..688b4cf72d 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;