diff options
| author | Potyra, Stefan <[email protected]> | 2019-06-13 22:55:55 +0000 |
|---|---|---|
| committer | Linus Torvalds <[email protected]> | 2019-06-14 03:34:56 +0000 |
| commit | dedca63504a204dc8410d98883fdc16dffa8cb80 (patch) | |
| tree | 9c0cf66ad0333054241acc8bf3c32e32efe25109 /tools/perf/scripts/python/mem-phys-addr.py | |
| parent | scripts/decode_stacktrace.sh: prefix addr2line with $CROSS_COMPILE (diff) | |
| download | kernel-dedca63504a204dc8410d98883fdc16dffa8cb80.tar.gz kernel-dedca63504a204dc8410d98883fdc16dffa8cb80.zip | |
mm/mlock.c: mlockall error for flag MCL_ONFAULT
If mlockall() is called with only MCL_ONFAULT as flag, it removes any
previously applied lockings and does nothing else.
This behavior is counter-intuitive and doesn't match the Linux man page.
For mlockall():
EINVAL Unknown flags were specified or MCL_ONFAULT was specified
without either MCL_FUTURE or MCL_CURRENT.
Consequently, return the error EINVAL, if only MCL_ONFAULT is passed.
That way, applications will at least detect that they are calling
mlockall() incorrectly.
Link: http://lkml.kernel.org/r/[email protected]
Fixes: b0f205c2a308 ("mm: mlock: add mlock flags to enable VM_LOCKONFAULT usage")
Signed-off-by: Stefan Potyra <[email protected]>
Reviewed-by: Daniel Jordan <[email protected]>
Acked-by: Michal Hocko <[email protected]>
Acked-by: Vlastimil Babka <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
Diffstat (limited to 'tools/perf/scripts/python/mem-phys-addr.py')
0 files changed, 0 insertions, 0 deletions
