Re: [PATCH] mm: redefine the MAP_SHARED_VALIDATE to other value

Matthew Wilcox
2019-07-08T14:43:53Z

On Mon, Jul 08, 2019 at 04:05:41PM +0800, zhong jiang wrote:
> As the mman manual says, mmap should return fails when we assign
> the flags to MAP_SHARED | MAP_PRIVATE.
>
> But In fact, We run the code successfully and unexpected.
> It is because MAP_SHARED_VALIDATE is introduced and equal to
> MAP_SHARED | MAP_PRIVATE.

No, you don't understand. Look back at the introduction of
MAP_SHARED_VALIDATE.