ftrace: iter ctrl fix
authorIngo Molnar <mingo@elte.hu>
Mon, 12 May 2008 19:20:53 +0000 (21:20 +0200)
committerThomas Gleixner <tglx@linutronix.de>
Fri, 23 May 2008 19:08:12 +0000 (21:08 +0200)
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
kernel/trace/trace.c

index 3ae17e2..688b4cf 100644 (file)
@@ -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;