diff options
author | Sasha Levin <levinsasha928@gmail.com> | 2012-05-10 13:01:44 -0700 |
---|---|---|
committer | Varun Wadekar <vwadekar@nvidia.com> | 2012-05-18 16:06:48 +0530 |
commit | 056de96d166e6bc352d67134f40d5af4e78b263c (patch) | |
tree | be5864cb2f07eb02d4b8d36a41c4fde05f6b0831 /mm/percpu-vm.c | |
parent | 0fb90fdbbde5743eb59472028680ad315a7ea465 (diff) |
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 <levinsasha928@gmail.com>
Reviewed-by: Minchan Kim <minchan@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'mm/percpu-vm.c')
0 files changed, 0 insertions, 0 deletions