mirror of
https://github.com/torvalds/linux.git
synced 2024-11-16 09:02:00 +00:00
Merge branch 'tracing-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip
* 'tracing-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip: ftrace: do_each_pid_task() needs rcu lock
This commit is contained in:
commit
9f96ae6ee0
@ -1737,9 +1737,12 @@ static void clear_ftrace_pid(struct pid *pid)
|
||||
{
|
||||
struct task_struct *p;
|
||||
|
||||
rcu_read_lock();
|
||||
do_each_pid_task(pid, PIDTYPE_PID, p) {
|
||||
clear_tsk_trace_trace(p);
|
||||
} while_each_pid_task(pid, PIDTYPE_PID, p);
|
||||
rcu_read_unlock();
|
||||
|
||||
put_pid(pid);
|
||||
}
|
||||
|
||||
@ -1747,9 +1750,11 @@ static void set_ftrace_pid(struct pid *pid)
|
||||
{
|
||||
struct task_struct *p;
|
||||
|
||||
rcu_read_lock();
|
||||
do_each_pid_task(pid, PIDTYPE_PID, p) {
|
||||
set_tsk_trace_trace(p);
|
||||
} while_each_pid_task(pid, PIDTYPE_PID, p);
|
||||
rcu_read_unlock();
|
||||
}
|
||||
|
||||
static void clear_ftrace_pid_task(struct pid **pid)
|
||||
|
Loading…
Reference in New Issue
Block a user