]> Git Repo - linux.git/commit
mm, oom: remove 3% bonus for CAP_SYS_ADMIN processes
authorDavid Rientjes <[email protected]>
Thu, 5 Apr 2018 23:25:19 +0000 (16:25 -0700)
committerLinus Torvalds <[email protected]>
Fri, 6 Apr 2018 04:36:27 +0000 (21:36 -0700)
commitd46078b2888947a86b6bb997cd5927e602e8fdc9
tree84c5dedfbf534274212214e7f3c31af8a69547e7
parent5ecd9d403ad081ed2de7b118c1e96124d4e0ba6c
mm, oom: remove 3% bonus for CAP_SYS_ADMIN processes

Since the 2.6 kernel, the oom killer has slightly biased away from
CAP_SYS_ADMIN processes by discounting some of its memory usage in
comparison to other processes.

This has always been implicit and nothing exactly relies on the
behavior.

Gaurav notices that __task_cred() can dereference a potentially freed
pointer if the task under consideration is exiting because a reference
to the task_struct is not held.

Remove the CAP_SYS_ADMIN bias so that all processes are treated equally.

If any CAP_SYS_ADMIN process would like to be biased against, it is
always allowed to adjust /proc/pid/oom_score_adj.

Link: http://lkml.kernel.org/r/[email protected]
Signed-off-by: David Rientjes <[email protected]>
Reported-by: Gaurav Kohli <[email protected]>
Acked-by: Michal Hocko <[email protected]>
Cc: Kirill A. Shutemov <[email protected]>
Cc: Andrea Arcangeli <[email protected]>
Cc: Tetsuo Handa <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
mm/oom_kill.c
This page took 0.051623 seconds and 4 git commands to generate.