aboutsummaryrefslogtreecommitdiffstats
path: root/mm
diff options
context:
space:
mode:
authorOleg Nesterov <oleg@redhat.com>2014-12-12 19:56:27 -0500
committerLinus Torvalds <torvalds@linux-foundation.org>2014-12-13 15:42:49 -0500
commit6a2d5679b4a852a3bf80c570644456ab466ab714 (patch)
treeec4d85627deeffe0452197d2cf9c372fa586bca8 /mm
parentd003f371b27016354c392464819530d47a915765 (diff)
oom: kill the insufficient and no longer needed PT_TRACE_EXIT check
After the previous patch we can remove the PT_TRACE_EXIT check in oom_scan_process_thread(), it was added to handle the case when the coredumping was "frozen" by ptrace, but it doesn't really work. If nothing else, we would need to check all threads which could share the same ->mm to make it more or less correct. Signed-off-by: Oleg Nesterov <oleg@redhat.com> Cc: Cong Wang <xiyou.wangcong@gmail.com> Cc: David Rientjes <rientjes@google.com> Acked-by: Michal Hocko <mhocko@suse.cz> Cc: "Rafael J. Wysocki" <rjw@rjwysocki.net> Cc: Tejun Heo <tj@kernel.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'mm')
-rw-r--r--mm/oom_kill.c11
1 files changed, 3 insertions, 8 deletions
diff --git a/mm/oom_kill.c b/mm/oom_kill.c
index f694ef0d9f9a..d503e9ce1c7b 100644
--- a/mm/oom_kill.c
+++ b/mm/oom_kill.c
@@ -281,14 +281,9 @@ enum oom_scan_t oom_scan_process_thread(struct task_struct *task,
281 if (oom_task_origin(task)) 281 if (oom_task_origin(task))
282 return OOM_SCAN_SELECT; 282 return OOM_SCAN_SELECT;
283 283
284 if (task_will_free_mem(task) && !force_kill) { 284 if (task_will_free_mem(task) && !force_kill)
285 /* 285 return OOM_SCAN_ABORT;
286 * If this task is not being ptraced on exit, then wait for it 286
287 * to finish before killing some other task unnecessarily.
288 */
289 if (!(task->group_leader->ptrace & PT_TRACE_EXIT))
290 return OOM_SCAN_ABORT;
291 }
292 return OOM_SCAN_OK; 287 return OOM_SCAN_OK;
293} 288}
294 289