diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2008-08-16 00:32:13 +0200 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2008-08-16 00:32:13 +0200 |
commit | 71ef2a46fce43042a60d7ccbf55ecbd789c03c2e (patch) | |
tree | 247c3e25958ff362b8a7b5b735a1e7d2ef6842c7 /mm | |
parent | Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/coo... (diff) | |
parent | security: Fix setting of PF_SUPERPRIV by __capable() (diff) | |
download | linux-71ef2a46fce43042a60d7ccbf55ecbd789c03c2e.tar.xz linux-71ef2a46fce43042a60d7ccbf55ecbd789c03c2e.zip |
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jmorris/security-testing-2.6
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jmorris/security-testing-2.6:
security: Fix setting of PF_SUPERPRIV by __capable()
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 @@ #include <linux/module.h> #include <linux/notifier.h> #include <linux/memcontrol.h> +#include <linux/security.h> int sysctl_panic_on_oom; int sysctl_oom_kill_allocating_task; @@ -128,7 +129,8 @@ unsigned long badness(struct task_struct *p, unsigned long uptime) * Superuser processes are usually more important, so we make it * less likely that we kill those. */ - if (__capable(p, CAP_SYS_ADMIN) || __capable(p, CAP_SYS_RESOURCE)) + if (has_capability(p, CAP_SYS_ADMIN) || + has_capability(p, CAP_SYS_RESOURCE)) points /= 4; /* @@ -137,7 +139,7 @@ unsigned long badness(struct task_struct *p, unsigned long uptime) * tend to only have this flag set on applications they think * of as important. */ - if (__capable(p, CAP_SYS_RAWIO)) + if (has_capability(p, CAP_SYS_RAWIO)) points /= 4; /* |