diff options
author | Oleg Nesterov <[email protected]> | 2014-12-10 15:54:48 -0800 |
---|---|---|
committer | Linus Torvalds <[email protected]> | 2014-12-10 17:41:17 -0800 |
commit | f953ccd00615140b5e722ffe2b920da22dfb4db9 (patch) | |
tree | 6c087e1e9f3c8bdd941bbdcf8d7bec472272b5a5 /tools/perf/scripts/python/event_analyzing_sample.py | |
parent | f6507f83bccd4a5f7dc7091079bf58128dc56d66 (diff) |
exit: wait: don't use zombie->real_parent
1. wait_task_zombie() uses p->real_parent to get psig/siglock. This is
correct but needs tasklist_lock, ->real_parent can exit.
We can use "current" instead. This is our natural child, its parent
must be our sub-thread.
2. Read psig/sig outside of ->siglock, ->signal is no longer protected
by this lock.
3. Fix the outdated comments about tasklist_lock. We can not race with
__exit_signal(), the whole thread group is dead, nobody but us can
call it.
Also clarify the usage of ->stats_lock and ->siglock.
Note: thread_group_cputime_adjusted() is sub-optimal in this case, we
probably want to export cputime_adjust() to avoid thread_group_cputime().
The comment says "all threads" but there are no other threads.
Signed-off-by: Oleg Nesterov <[email protected]>
Cc: Aaron Tomlin <[email protected]>
Cc: "Eric W. Biederman" <[email protected]>
Cc: Rik van Riel <[email protected]>
Cc: Sterling Alexander <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
Diffstat (limited to 'tools/perf/scripts/python/event_analyzing_sample.py')
0 files changed, 0 insertions, 0 deletions