From: David Rientjes Date: Fri, 8 Jun 2012 20:21:26 +0000 (-0700) Subject: mm, oom: fix badness score underflow X-Git-Tag: v3.5-rc2~1 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=1e11ad8dc42975d5c2bab7d478f6cd875602eda4;p=pandora-kernel.git 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 Acked-by: Oleg Nesterov Signed-off-by: David Rientjes Signed-off-by: Linus Torvalds --- Reading git-diff-tree failed