David Rientjes 1e11ad8dc4 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>
2012-06-08 15:07:35 -07:00
..
2012-05-29 23:28:33 -04:00
2012-01-03 22:54:56 -05:00
2012-05-30 08:48:13 -07:00
2011-07-26 16:49:47 -07:00
2010-05-21 18:31:21 -04:00
2012-06-04 17:17:31 -04:00
2012-01-20 09:23:16 -08:00
2011-05-20 12:50:29 -07:00
2012-05-29 16:22:19 -07:00
2012-05-29 16:22:28 -07:00
2012-05-29 16:22:23 -07:00
2012-06-01 10:37:18 -04:00