Skip to content
Commit ae80b404 authored by Linus Torvalds's avatar Linus Torvalds
Browse files

mm: validate the mm before dropping the mmap lock



Commit 408579cd ("mm: Update do_vmi_align_munmap() return
semantics") made the return value and locking semantics of
do_vmi_align_munmap() more straightforward, but in the process it ended
up unlocking the mmap lock just a tad too early: the debug code doing
the mmap layout validation still needs to run with the lock held, or
things might change under it while it's trying to validate things.

So just move the unlocking to after the validate_mm() call.

Reported-by: default avatarkernel test robot <oliver.sang@intel.com>
Link: https://lore.kernel.org/lkml/ZKIsoMOT71uwCIZX@xsang-OptiPlex-9020/


Fixes: 408579cd ("mm: Update do_vmi_align_munmap() return semantics")
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent f66066bc
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment