diff options
| author | Han Pingtian <[email protected]> | 2014-01-23 15:53:17 -0800 |
|---|---|---|
| committer | Linus Torvalds <[email protected]> | 2014-01-23 16:36:52 -0800 |
| commit | da8c757b080ee84f219fa2368cb5dd23ac304fc0 (patch) | |
| tree | c6a351683151f272a488e0fc379653a1b259e64f /tools/perf/scripts/python/syscall-counts-by-pid.py | |
| parent | cc81717ed3bc6d4f3738d13a1e097437caada0e9 (diff) | |
mm: prevent setting of a value less than 0 to min_free_kbytes
If echo -1 > /proc/vm/sys/min_free_kbytes, the system will hang. Changing
proc_dointvec() to proc_dointvec_minmax() in the
min_free_kbytes_sysctl_handler() can prevent this to happen.
mhocko said:
: You can still do echo $BIG_VALUE > /proc/vm/sys/min_free_kbytes and make
: your machine unusable but I agree that proc_dointvec_minmax is more
: suitable here as we already have:
:
: .proc_handler = min_free_kbytes_sysctl_handler,
: .extra1 = &zero,
:
: It used to work properly but then 6fce56ec91b5 ("sysctl: Remove references
: to ctl_name and strategy from the generic sysctl table") has removed
: sysctl_intvec strategy and so extra1 is ignored.
Signed-off-by: Han Pingtian <[email protected]>
Acked-by: Michal Hocko <[email protected]>
Acked-by: David Rientjes <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
Diffstat (limited to 'tools/perf/scripts/python/syscall-counts-by-pid.py')
0 files changed, 0 insertions, 0 deletions