]> Git Repo - linux.git/commit
mm: fix division by 0 in percpu_pagelist_fraction()
authorSasha Levin <[email protected]>
Thu, 10 May 2012 20:01:44 +0000 (13:01 -0700)
committerLinus Torvalds <[email protected]>
Thu, 10 May 2012 22:06:44 +0000 (15:06 -0700)
commit93278814d3590eba0ee360b8d69a35c7f2203ea8
tree17784192015e71464f1064af2b071c8cd7fe7f13
parent16fbdce62d9c89b794e303f4a232e4749b77e9ac
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 <[email protected]>
Reviewed-by: Minchan Kim <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
mm/page_alloc.c
This page took 0.04951 seconds and 4 git commands to generate.