[LTP] [PATCH] openposix: mmap/21-1: use all bits set as the invalid flag

Stanislav Kholmanskikh stanislav.kholmanskikh@oracle.com
Thu Mar 1 11:59:46 CET 2018



On 03/01/2018 12:50 PM, Cyril Hrubis wrote:
> Hi!
>> The test is trying to trigger EINVAL by passing an invalid flags
>> value to mmap(). Linux commit 50a8e840d050 ("mm: introduce MAP_SHARED_VALIDATE, a mechanism to safely define new mmap flags")
>> introduced a new flag (MAP_SHARED_VALIDATE) and that flag may not be the last one.
>>
>> So instead of adding an 'if' for each new flag we use a value with all bits
>> set (which is unlikely to be a valid flag).
> 
> Acked, thanks.
> 
Thank you. Committed.


More information about the ltp mailing list