[PATCH v2] mm: mlockall error for flag MCL_ONFAULT

2019-05-27 Thread Potyra, Stefan
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 with‐ o

[PATCH] mm: mlockall error for flag MCL_ONFAULT

2019-05-22 Thread Potyra, Stefan
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. Consequently, return the error EINVAL, if only MCL_ONFAULT is passed. That way, applications will at le