Searched hist:"78 d9cf6041b968cc881fd22e25e2662d1cec4dba" (Results 1 – 1 of 1) sorted by relevance
/linux/mm/ |
H A D | mmap.c | diff 78d9cf6041b968cc881fd22e25e2662d1cec4dba Tue Jun 29 04:38:39 CEST 2021 Gonzalo Matias Juarez Tello <gmjuareztello@gmail.com> mm/mmap.c: logic of find_vma_intersection repeated in __do_munmap
Logic of find_vma_intersection() is repeated in __do_munmap().
Also, prev is assigned a value before checking vma->vm_start >= end which might end up on a return statement making that assignment useless.
Calling find_vma_intersection() checks that condition and returns NULL if no vma is found, hence only the !vma check is needed in __do_munmap().
Link: https://lkml.kernel.org/r/20210409162129.18313-1-gmjuareztello@gmail.com Signed-off-by: Gonzalo Matias Juarez Tello <gmjuareztello@gmail.com> Reviewed-by: Andrew Morton <akpm@linux-foundation.org> Reviewed-by: David Hildenbrand <david@redhat.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
|