Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
mm/vma: return the exact errno in vms_gather_munmap_vmas()
__split_vma() and mas_store_gfp() returns several types of errno on failure so don't ignore them in vms_gather_munmap_vmas(). For example, __split_vma() returns -EINVAL when an unaligned huge page is unmapped. This issue is reproduced by ltp memfd_create03 test. Don't initialise the error variable and assign it when a failure actually occurs. [[email protected]: fix whitespace, per Liam] Link: https://lkml.kernel.org/r/[email protected] Fixes: 6898c90 ("mm/vma: extract the gathering of vmas from do_vmi_align_munmap()") Signed-off-by: Xiao Yang <[email protected]> Suggested-by: Lorenzo Stoakes <[email protected]> Reported-by: kernel test robot <[email protected]> Closes: https://lore.kernel.org/oe-lkp/[email protected] Cc: "Liam R. Howlett" <[email protected]> Signed-off-by: Andrew Morton <[email protected]>
- Loading branch information