提交 fb662288 编写于 作者: S Steven Rostedt (Red Hat) 提交者: Steven Rostedt

tracing: Fix sparse RCU warning

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: Nkbuild test robot <fengguang.wu@intel.com>
Signed-off-by: NSteven Rostedt <rostedt@goodmis.org>
上级 8ca532ad
...@@ -938,6 +938,7 @@ static void t_stop(struct seq_file *m, void *p) ...@@ -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) static void *p_start(struct seq_file *m, loff_t *pos)
__acquires(RCU)
{ {
struct trace_pid_list *pid_list; struct trace_pid_list *pid_list;
struct trace_array *tr = m->private; struct trace_array *tr = m->private;
...@@ -960,6 +961,7 @@ static void *p_start(struct seq_file *m, loff_t *pos) ...@@ -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) static void p_stop(struct seq_file *m, void *p)
__releases(RCU)
{ {
rcu_read_unlock_sched(); rcu_read_unlock_sched();
mutex_unlock(&event_mutex); mutex_unlock(&event_mutex);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册