diff options
| author | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2026-04-18 10:46:48 +0200 |
|---|---|---|
| committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2026-04-18 10:46:48 +0200 |
| commit | c15712c3602826e862340f34eba342d2d98fe697 (patch) | |
| tree | 69fef4d6974e07ea7f8932a2812abcbc673bfa3b /mm/vma.c | |
| parent | 2471b673d88d8ff8640ceae8a6df2dc9b68521da (diff) | |
| parent | c37bbb1b5317a6418ed353be26a3a12feca6f9c5 (diff) | |
Merge v6.19.13linux-rolling-stable
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'mm/vma.c')
| -rw-r--r-- | mm/vma.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/mm/vma.c b/mm/vma.c index 7a908a964d18d..690e68931868d 100644 --- a/mm/vma.c +++ b/mm/vma.c @@ -2774,6 +2774,13 @@ unacct_error: if (map.charged) vm_unacct_memory(map.charged); abort_munmap: + /* + * This indicates that .mmap_prepare has set a new file, differing from + * desc->vm_file. But since we're aborting the operation, only the + * original file will be cleaned up. Ensure we clean up both. + */ + if (map.file_doesnt_need_get) + fput(map.file); vms_abort_munmap_vmas(&map.vms, &map.mas_detach); return error; } |
