Skip to contentSkip to conversation

mm: mmap: Merge vma after call_mmap() if possible

PATCH linmiaohe 1 participant 1 message Jul 14, 2020 Memory management

lore
Share & tools
lore

linmiaohe

author
#0 lore raw
Quoted 8 lines · Andrew Morton
Quoted 4 lines · On Tue, 14 Jul 2020 11:07:44 +0800 linmiaohe <[email protected]> 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.