ftrace: Clear bits properly in reset_iter_read()
authorDan Carpenter <dan.carpenter@oracle.com>
Sat, 9 Jun 2012 16:10:27 +0000 (19:10 +0300)
committerBen Hutchings <ben@decadent.org.uk>
Thu, 3 Jan 2013 03:33:10 +0000 (03:33 +0000)
commit 70f77b3f7ec010ff9624c1f2e39a81babc9e2429 upstream.

There is a typo here where '&' is used instead of '|' and it turns the
statement into a noop.  The original code is equivalent to:

iter->flags &= ~((1 << 2) & (1 << 4));

Link: http://lkml.kernel.org/r/20120609161027.GD6488@elgon.mountain
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
kernel/trace/ftrace.c

index 25b4f4d..54dba59 100644 (file)
@@ -2074,7 +2074,7 @@ static void reset_iter_read(struct ftrace_iterator *iter)
 {
        iter->pos = 0;
        iter->func_pos = 0;
-       iter->flags &= ~(FTRACE_ITER_PRINTALL & FTRACE_ITER_HASH);
+       iter->flags &= ~(FTRACE_ITER_PRINTALL | FTRACE_ITER_HASH);
 }
 
 static void *t_start(struct seq_file *m, loff_t *pos)