Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
mremap: don't leak new_vma if f_op->mremap() fails
move_vma() can't just return if f_op->mremap() fails, we should unmap the new vma like we do if move_page_tables() fails. To avoid the code duplication this patch moves the "move entries back" under the new "if (err)" branch. Signed-off-by: Oleg Nesterov <[email protected]> Acked-by: David Rientjes <[email protected]> Cc: Benjamin LaHaise <[email protected]> Cc: Hugh Dickins <[email protected]> Cc: Jeff Moyer <[email protected]> Cc: Kirill Shutemov <[email protected]> Cc: Pavel Emelyanov <[email protected]> Cc: Laurent Dufour <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
- Loading branch information