diff options
author | Michal Hocko <[email protected]> | 2011-01-13 15:47:26 -0800 |
---|---|---|
committer | Linus Torvalds <[email protected]> | 2011-01-13 17:32:49 -0800 |
commit | 08d4a24659f1284f33e574211435aa12ce968477 (patch) | |
tree | a3bfdee153157acd502452635aa33f842c0f97eb /tools/perf/scripts | |
parent | cb9ef8d5e394f70db64bda79c20d3569a20d2574 (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
[[email protected]: correctly propagate proc_doulongvec_minmax return code]
Signed-off-by: Michal Hocko <[email protected]>
Cc: CAI Qian <[email protected]>
Cc: Nishanth Aravamudan <[email protected]>
Cc: Andrea Arcangeli <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
Diffstat (limited to 'tools/perf/scripts')
0 files changed, 0 insertions, 0 deletions