tracing: Fix sparse RCU warning
authorSteven Rostedt (Red Hat) <rostedt@goodmis.org>
Mon, 26 Oct 2015 07:45:22 +0000 (03:45 -0400)
committerSteven Rostedt <rostedt@goodmis.org>
Mon, 26 Oct 2015 07:51:32 +0000 (03:51 -0400)
p_start() and p_stop() are seq_file functions that match. Teach sparse to
know that rcu_read_lock_sched() that is taken by p_start() is released by
p_stop.

Reported-by: kbuild test robot <fengguang.wu@intel.com>
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
kernel/trace/trace_events.c

index 2b7fccd499c665d92069497f4b976be0e43f50dd..fb0261e90acc8534fcaf21fd566bbe2f3a447743 100644 (file)
@@ -938,6 +938,7 @@ static void t_stop(struct seq_file *m, void *p)
 }
 
 static void *p_start(struct seq_file *m, loff_t *pos)
+       __acquires(RCU)
 {
        struct trace_pid_list *pid_list;
        struct trace_array *tr = m->private;
@@ -960,6 +961,7 @@ static void *p_start(struct seq_file *m, loff_t *pos)
 }
 
 static void p_stop(struct seq_file *m, void *p)
+       __releases(RCU)
 {
        rcu_read_unlock_sched();
        mutex_unlock(&event_mutex);