mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
synced 2025-01-09 15:29:16 +00:00
Fix error return from do_vmi_align_munmap()
-----BEGIN PGP SIGNATURE----- iQJGBAABCgAwFiEEMUsIrNDeSBEzpfKGm+mA/QrAFUQFAmSd8LASHGR3bXdAYW1h em9uLmNvLnVrAAoJEJvpgP0KwBVExK4P/RXQmDSDftYRoNiQV9X2K4O4NruST8L8 DoYrfa1vHIxVhpZQBHD8KmP1T7ZCPxwfw6ojLYugTZSzwstLEELm+eLjj1j0yPC9 xOYnsOQhlfjP4anV6scVI6WYWk8RogmpB288uXU5sjid6JmCcs4VHFsxvs4MjM52 +P/oGebOSjFQCTRXttFh+uuPlmb9bQ0OMdMkmzDuFIgyftupndFxEEVOW1SIMYLb c0nakgaRtoNQcuM8mR16BL33j7FZVMfqWoJAReX6/wkffNgSFr2jf8Xe5Y9pGgTx nO4fmc0cNDv5K85mIVDnRAFC6HLsctxnmWFt+h+HNIN8fP4rGcKL2XsFLy5p/mKj c8GK3TLp98W672MQTUcM9neMOjs3PSRE0BmXlpTLrx1VKWjc8eT8Sn6tlbEWcqhQ Kz3Zh2iSHIGoK0gjuCJ3N4kt6HBkkAzuGIslgBHyTWntExIH/KfDuQVA3XwoEdtf VpATTAv1CWcEDPp7iwAtIyKHjjsMz2Rp+WbsKE6O9TYJzn2fTF5Or0MND+5ntOxk n0TP8pIqrqY5fUFLpcJMrNqMPHqmlP2a0ZhsHRdT8xO94Wv0Z9gWSgzWNp4MY6w1 SWDfSI5cSJJg+pD1TlJXnE62Phyq9DH9+ATpDO6iFpTJe8QLCndr330w5EkScaWO Umkq3k789Jud =ePMY -----END PGP SIGNATURE----- Merge tag 'unmap-fix-20230629' of git://git.infradead.org/users/dwmw2/linux Pull mm fix from David Woodhouse: "Fix error return from do_vmi_align_munmap()" * tag 'unmap-fix-20230629' of git://git.infradead.org/users/dwmw2/linux: mm/mmap: Fix error return in do_vmi_align_munmap()
This commit is contained in:
commit
43ec8a620b
@ -2489,7 +2489,8 @@ do_vmi_align_munmap(struct vma_iterator *vmi, struct vm_area_struct *vma,
|
||||
}
|
||||
vma_start_write(next);
|
||||
mas_set_range(&mas_detach, next->vm_start, next->vm_end - 1);
|
||||
if (mas_store_gfp(&mas_detach, next, GFP_KERNEL))
|
||||
error = mas_store_gfp(&mas_detach, next, GFP_KERNEL);
|
||||
if (error)
|
||||
goto munmap_gather_failed;
|
||||
vma_mark_detached(next, true);
|
||||
if (next->vm_flags & VM_LOCKED)
|
||||
@ -2542,12 +2543,12 @@ do_vmi_align_munmap(struct vma_iterator *vmi, struct vm_area_struct *vma,
|
||||
BUG_ON(count != test_count);
|
||||
}
|
||||
#endif
|
||||
/* Point of no return */
|
||||
error = -ENOMEM;
|
||||
vma_iter_set(vmi, start);
|
||||
if (vma_iter_clear_gfp(vmi, start, end, GFP_KERNEL))
|
||||
error = vma_iter_clear_gfp(vmi, start, end, GFP_KERNEL);
|
||||
if (error)
|
||||
goto clear_tree_failed;
|
||||
|
||||
/* Point of no return */
|
||||
mm->locked_vm -= locked_vm;
|
||||
mm->map_count -= count;
|
||||
/*
|
||||
|
Loading…
x
Reference in New Issue
Block a user