From: Sasha Levin Date: Thu, 10 May 2012 20:01:44 +0000 (-0700) Subject: mm: fix division by 0 in percpu_pagelist_fraction() X-Git-Tag: v3.4-rc7~13^2~6 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=93278814d3590eba0ee360b8d69a35c7f2203ea8;p=pandora-kernel.git mm: fix division by 0 in percpu_pagelist_fraction() percpu_pagelist_fraction_sysctl_handler() has only considered -EINVAL as a possible error from proc_dointvec_minmax(). If any other error is returned, it would proceed to divide by zero since percpu_pagelist_fraction wasn't getting initialized at any point. For example, writing 0 bytes into the proc file would trigger the issue. Signed-off-by: Sasha Levin Reviewed-by: Minchan Kim Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- Reading git-diff-tree failed