summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorMichal Hocko <mhocko@suse.cz>2011-01-13 15:47:26 -0800
committerLinus Torvalds <torvalds@linux-foundation.org>2011-01-13 17:32:49 -0800
commit08d4a24659f1284f33e574211435aa12ce968477 (patch)
treea3bfdee153157acd502452635aa33f842c0f97eb /tools
parentcb9ef8d5e394f70db64bda79c20d3569a20d2574 (diff)
hugetlb: check the return value of string conversion in sysctl handler
proc_doulongvec_minmax may fail if the given buffer doesn't represent a valid number. If we provide something invalid we will initialize the resulting value (nr_overcommit_huge_pages in this case) to a random value from the stack. The issue was introduced by a3d0c6aa when the default handler has been replaced by the helper function where we do not check the return value. Reproducer: echo "" > /proc/sys/vm/nr_overcommit_hugepages [akpm@linux-foundation.org: correctly propagate proc_doulongvec_minmax return code] Signed-off-by: Michal Hocko <mhocko@suse.cz> Cc: CAI Qian <caiqian@redhat.com> Cc: Nishanth Aravamudan <nacc@us.ibm.com> Cc: Andrea Arcangeli <aarcange@redhat.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'tools')
0 files changed, 0 insertions, 0 deletions