]> git.baikalelectronics.ru Git - kernel.git/commit
mm: mmap: merge vma after call_mmap() if possible
authorMiaohe Lin <linmiaohe@huawei.com>
Fri, 7 Aug 2020 06:23:34 +0000 (23:23 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Fri, 7 Aug 2020 18:33:27 +0000 (11:33 -0700)
commite8f773e1b42db2dcc9bcbc3e30548b3e14562078
treec8b3cafa4ce9f3d7df68b0396a87eb6c6841949f
parent16b900ed86f3b74bcf69058bc28c1fa1db5cfd14
mm: mmap: merge vma after call_mmap() if possible

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.

Signed-off-by: Hongxiang Lou <louhongxiang@huawei.com>
Signed-off-by: Miaohe Lin <linmiaohe@huawei.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Reviewed-by: Andrew Morton <akpm@linux-foundation.org>
Link: http://lkml.kernel.org/r/1594954065-23733-1-git-send-email-linmiaohe@huawei.com
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
mm/mmap.c