On Thu, Apr 02, 2026 at 04:59:32PM -0700, Anthony Yznaga wrote:
> On configs where MAP_DROPPABLE is not supported (currently any 32-bit
> config except for PPC32), mmap fails with errno set to ENOTSUPP.
> However, ENOTSUPP is not a standard error value that userspace knows
> about. The acceptable userspace-visible errno to use is EOPNOTSUPP.
> checkpatch.pl has a warning to this effect.
> 
> Fixes: 9651fcedf7b9 ("mm: add MAP_DROPPABLE for designating always lazily 
> freeable mappings")
> Cc: <[email protected]>
> Signed-off-by: Anthony Yznaga <[email protected]>

FWIW I'm not a huge fan of EOPNOTSUPP here, because there's no precedent for
EOPNOTSUPP (it would perhaps normally be EINVAL, but the kernel does recognize
the flag, it just can't implement it...)

Anyway,

Reviewed-by: Pedro Falcato <[email protected]>

-- 
Pedro

Reply via email to