diff options
Diffstat (limited to 'mm')
-rw-r--r-- | mm/oom_kill.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/mm/oom_kill.c b/mm/oom_kill.c index 8a5467ee6265..64e5b4bcd964 100644 --- a/mm/oom_kill.c +++ b/mm/oom_kill.c | |||
@@ -26,6 +26,7 @@ | |||
26 | #include <linux/module.h> | 26 | #include <linux/module.h> |
27 | #include <linux/notifier.h> | 27 | #include <linux/notifier.h> |
28 | #include <linux/memcontrol.h> | 28 | #include <linux/memcontrol.h> |
29 | #include <linux/security.h> | ||
29 | 30 | ||
30 | int sysctl_panic_on_oom; | 31 | int sysctl_panic_on_oom; |
31 | int sysctl_oom_kill_allocating_task; | 32 | int sysctl_oom_kill_allocating_task; |
@@ -128,7 +129,8 @@ unsigned long badness(struct task_struct *p, unsigned long uptime) | |||
128 | * Superuser processes are usually more important, so we make it | 129 | * Superuser processes are usually more important, so we make it |
129 | * less likely that we kill those. | 130 | * less likely that we kill those. |
130 | */ | 131 | */ |
131 | if (__capable(p, CAP_SYS_ADMIN) || __capable(p, CAP_SYS_RESOURCE)) | 132 | if (has_capability(p, CAP_SYS_ADMIN) || |
133 | has_capability(p, CAP_SYS_RESOURCE)) | ||
132 | points /= 4; | 134 | points /= 4; |
133 | 135 | ||
134 | /* | 136 | /* |
@@ -137,7 +139,7 @@ unsigned long badness(struct task_struct *p, unsigned long uptime) | |||
137 | * tend to only have this flag set on applications they think | 139 | * tend to only have this flag set on applications they think |
138 | * of as important. | 140 | * of as important. |
139 | */ | 141 | */ |
140 | if (__capable(p, CAP_SYS_RAWIO)) | 142 | if (has_capability(p, CAP_SYS_RAWIO)) |
141 | points /= 4; | 143 | points /= 4; |
142 | 144 | ||
143 | /* | 145 | /* |