Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> wrote: > On Tue, 14 Jul 2020 11:07:44 +0800 linmiaohe <linmiaohe@xxxxxxxxxx> wrote: > >> The vm_flags may be changed after call_mmap() because drivers may set >> some flags for their own purpose. As a result, we failed to merge the >> adjacent vma due to the different vm_flags as userspace can't pass in the same one. >> Try to merge vma after call_mmap() to fix this issue. > >Which drivers do this? I searched the code and I see many drivers change the vm_flags, such as aio_ring_mmap set VM_DONTEXPAND and amdgpu_mmap , binder_mmap also change the vm_flags , and so on... Thanks.