diff options
author | David Rientjes <[email protected]> | 2012-06-08 13:21:26 -0700 |
---|---|---|
committer | Linus Torvalds <[email protected]> | 2012-06-08 15:07:35 -0700 |
commit | 1e11ad8dc42975d5c2bab7d478f6cd875602eda4 (patch) | |
tree | 62e755edfd19ac45cc11b50311ad802907485ff7 /tools/perf/scripts/python/Perf-Trace-Util/Context.c | |
parent | 72494504498ff5ac2f086a83473d4dd1ca490bd3 (diff) |
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 <[email protected]>
Acked-by: Oleg Nesterov <[email protected]>
Signed-off-by: David Rientjes <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
Diffstat (limited to 'tools/perf/scripts/python/Perf-Trace-Util/Context.c')
0 files changed, 0 insertions, 0 deletions