mm/mmap: Fix VM_LOCKED check in do_vmi_align_munmap()
6.1 backport of the patch [1] uses 'next' vma instead of 'split' vma. Fix the mistake. [1] commit606c812eb1
("mm/mmap: Fix error path in do_vmi_align_munmap()") Fixes:a149174ff8
("mm/mmap: Fix error path in do_vmi_align_munmap()") Signed-off-by: Suren Baghdasaryan <surenb@google.com> Cc: stable@vger.kernel.org Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
b91748bdbf
commit
e0d7a96b27
|
@ -2484,7 +2484,7 @@ do_mas_align_munmap(struct ma_state *mas, struct vm_area_struct *vma,
|
|||
error = mas_store_gfp(&mas_detach, split, GFP_KERNEL);
|
||||
if (error)
|
||||
goto munmap_gather_failed;
|
||||
if (next->vm_flags & VM_LOCKED)
|
||||
if (split->vm_flags & VM_LOCKED)
|
||||
locked_vm += vma_pages(split);
|
||||
|
||||
count++;
|
||||
|
|
Loading…
Reference in New Issue