* + remap_file_pages-use-vma_lookup-instead-of-find_vma.patch added to -mm tree
@ 2021-08-17 19:25 akpm
0 siblings, 0 replies; only message in thread
From: akpm @ 2021-08-17 19:25 UTC (permalink / raw)
To: mm-commits, david, Liam.Howlett
The patch titled
Subject: remap_file_pages: Use vma_lookup() instead of find_vma()
has been added to the -mm tree. Its filename is
remap_file_pages-use-vma_lookup-instead-of-find_vma.patch
This patch should soon appear at
https://ozlabs.org/~akpm/mmots/broken-out/remap_file_pages-use-vma_lookup-instead-of-find_vma.patch
and later at
https://ozlabs.org/~akpm/mmotm/broken-out/remap_file_pages-use-vma_lookup-instead-of-find_vma.patch
Before you just go and hit "reply", please:
a) Consider who else should be cc'ed
b) Prefer to cc a suitable mailing list as well
c) Ideally: find the original patch on the mailing list and do a
reply-to-all to that, adding suitable additional cc's
*** Remember to use Documentation/process/submit-checklist.rst when testing your code ***
The -mm tree is included into linux-next and is updated
there every 3-4 working days
------------------------------------------------------
From: "Liam R. Howlett" <Liam.Howlett@Oracle.com>
Subject: remap_file_pages: Use vma_lookup() instead of find_vma()
Using vma_lookup() verifies the start address is contained in the found vma.
This results in easier to read code.
Link: https://lkml.kernel.org/r/20210817135234.1550204-1-Liam.Howlett@oracle.com
Signed-off-by: Liam R. Howlett <Liam.Howlett@Oracle.com>
Reviewed-by: David Hildenbrand <david@redhat.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---
mm/mmap.c | 5 +----
1 file changed, 1 insertion(+), 4 deletions(-)
--- a/mm/mmap.c~remap_file_pages-use-vma_lookup-instead-of-find_vma
+++ a/mm/mmap.c
@@ -2994,14 +2994,11 @@ SYSCALL_DEFINE5(remap_file_pages, unsign
if (mmap_write_lock_killable(mm))
return -EINTR;
- vma = find_vma(mm, start);
+ vma = vma_lookup(mm, start);
if (!vma || !(vma->vm_flags & VM_SHARED))
goto out;
- if (start < vma->vm_start)
- goto out;
-
if (start + size > vma->vm_end) {
struct vm_area_struct *next;
_
Patches currently in -mm which might be from Liam.Howlett@Oracle.com are
remap_file_pages-use-vma_lookup-instead-of-find_vma.patch
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2021-08-17 19:25 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-08-17 19:25 + remap_file_pages-use-vma_lookup-instead-of-find_vma.patch added to -mm tree akpm
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).