summaryrefslogtreecommitdiffstats
path: root/kernel/printk.c
diff options
context:
space:
mode:
authorDavid Rientjes <rientjes@google.com>2012-06-08 22:21:26 +0200
committerLinus Torvalds <torvalds@linux-foundation.org>2012-06-09 00:07:35 +0200
commit1e11ad8dc42975d5c2bab7d478f6cd875602eda4 (patch)
tree62e755edfd19ac45cc11b50311ad802907485ff7 /kernel/printk.c
parentMerge branch 'sched-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/k... (diff)
downloadlinux-1e11ad8dc42975d5c2bab7d478f6cd875602eda4.tar.xz
linux-1e11ad8dc42975d5c2bab7d478f6cd875602eda4.zip
mm, oom: fix badness score underflow
If the privileges given to root threads (3% of allowable memory) or a negative value of /proc/pid/oom_score_adj happen to exceed the amount of rss of a thread, its badness score overflows as a result of commit a7f638f999ff ("mm, oom: normalize oom scores to oom_score_adj scale only for userspace"). Fix this by making the type signed and return 1, meaning the thread is still eligible for kill, if the value is negative. Reported-by: Dave Jones <davej@redhat.com> Acked-by: Oleg Nesterov <oleg@redhat.com> Signed-off-by: David Rientjes <rientjes@google.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'kernel/printk.c')
0 files changed, 0 insertions, 0 deletions