From: David Rientjes Date: Wed, 20 Jun 2012 19:52:58 +0000 (-0700) Subject: mm, oom: fix and cleanup oom score calculations X-Git-Tag: v3.5-rc4~20^2~17 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=61eafb00d55dfbccdfce543c6b60e369ff4f8f18;p=pandora-kernel.git mm, oom: fix and cleanup oom score calculations The divide in p->signal->oom_score_adj * totalpages / 1000 within oom_badness() was causing an overflow of the signed long data type. This adds both the root bias and p->signal->oom_score_adj before doing the normalization which fixes the issue and also cleans up the calculation. Tested-by: Dave Jones Signed-off-by: David Rientjes Cc: KOSAKI Motohiro Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- Reading git-diff-tree failed