diff options
| author | Oleg Nesterov <[email protected]> | 2014-01-21 15:49:58 -0800 |
|---|---|---|
| committer | Linus Torvalds <[email protected]> | 2014-01-21 16:19:46 -0800 |
| commit | 1da4db0cd5c8a31d4468ec906b413e75e604b465 (patch) | |
| tree | 7b413ea40f6630376032d59bd7525e0372ea2d6e /tools/perf/scripts/python | |
| parent | 0c740d0afc3bff0a097ad03a1c8df92757516f5c (diff) | |
oom_kill: change oom_kill.c to use for_each_thread()
Change oom_kill.c to use for_each_thread() rather than the racy
while_each_thread() which can loop forever if we race with exit.
Note also that most users were buggy even if while_each_thread() was
fine, the task can exit even _before_ rcu_read_lock().
Fortunately the new for_each_thread() only requires the stable
task_struct, so this change fixes both problems.
Signed-off-by: Oleg Nesterov <[email protected]>
Reviewed-by: Sergey Dyasly <[email protected]>
Tested-by: Sergey Dyasly <[email protected]>
Reviewed-by: Sameer Nanda <[email protected]>
Cc: "Eric W. Biederman" <[email protected]>
Cc: Frederic Weisbecker <[email protected]>
Cc: Mandeep Singh Baines <[email protected]>
Cc: "Ma, Xindong" <[email protected]>
Reviewed-by: Michal Hocko <[email protected]>
Cc: "Tu, Xiaobing" <[email protected]>
Acked-by: David Rientjes <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
Diffstat (limited to 'tools/perf/scripts/python')
0 files changed, 0 insertions, 0 deletions