Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
The posix_madvise() function succeeds (and does nothing) when called with parameters (NULL, 0, -1); according to LSB tests, it should fail with EINVAL because -1 is not a valid flag. When called with a valid address and size, it correctly fails. So perform an initial check for valid flags first. Reported-by: Jiri Dluhos <[email protected]> Signed-off-by: Nick Piggin <[email protected]> Reviewed-and-Tested-by: WANG Cong <[email protected]> Cc: Michael Kerrisk <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
- Loading branch information