aboutsummaryrefslogtreecommitdiffstats
path: root/mm/ksm.c
diff options
context:
space:
mode:
authorEric B Munson <emunson@mgebm.net>2011-01-13 15:47:28 -0800
committerLinus Torvalds <torvalds@linux-foundation.org>2011-01-13 17:32:49 -0800
commit73ae31e5986a4c0ee84bfd13ccd9b57a98956f6f (patch)
tree03e8c6e4559d5f77ec8f0fdf79addeecbef65ed9 /mm/ksm.c
parenthugetlb: do not allow pagesize >= MAX_ORDER pool adjustment (diff)
downloadlinux-dev-73ae31e5986a4c0ee84bfd13ccd9b57a98956f6f.tar.xz
linux-dev-73ae31e5986a4c0ee84bfd13ccd9b57a98956f6f.zip
hugetlb: fix handling of parse errors in sysfs
When parsing changes to the huge page pool sizes made from userspace via the sysfs interface, bogus input values are being covered up by nr_hugepages_store_common and nr_overcommit_hugepages_store returning 0 when strict_strtoul returns an error. This can cause an infinite loop in the nr_hugepages_store code. This patch changes the return value for these functions to -EINVAL when strict_strtoul returns an error. Signed-off-by: Eric B Munson <emunson@mgebm.net> Reported-by: CAI Qian <caiqian@redhat.com> Cc: Andrea Arcangeli <aarcange@redhat.com> Cc: Eric B Munson <emunson@mgebm.net> Cc: Michal Hocko <mhocko@suse.cz> Cc: Nishanth Aravamudan <nacc@us.ibm.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to '')
0 files changed, 0 insertions, 0 deletions