From: Liam R. Howlett Date: Wed, 21 Jan 2026 16:49:37 +0000 (-0500) Subject: mm/mmap: move exit_mmap() trace point X-Git-Tag: v7.0-rc1~47^2~31 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=95725acc3cd839afee8320591dbd968770196210;p=thirdparty%2Fkernel%2Fstable.git mm/mmap: move exit_mmap() trace point Move the trace point later in the function so that it is not skipped in the event of a failed fork. Link: https://lkml.kernel.org/r/20260121164946.2093480-3-Liam.Howlett@oracle.com Signed-off-by: Liam R. Howlett Acked-by: Chris Li Reviewed-by: Lorenzo Stoakes Reviewed-by: David Hildenbrand Reviewed-by: Pedro Falcato Reviewed-by: Suren Baghdasaryan Cc: Baoquan He Cc: Barry Song Cc: David Hildenbrand Cc: Jann Horn Cc: Kairui Song Cc: Kemeng Shi Cc: Matthew Wilcox (Oracle) Cc: Michal Hocko Cc: Mike Rapoport Cc: Nhat Pham Cc: SeongJae Park Cc: Vlastimil Babka Signed-off-by: Andrew Morton --- diff --git a/mm/mmap.c b/mm/mmap.c index 4bdb9ffa9e257..1f025edf8d7d0 100644 --- a/mm/mmap.c +++ b/mm/mmap.c @@ -1307,9 +1307,9 @@ void exit_mmap(struct mm_struct *mm) BUG_ON(count != mm->map_count); - trace_exit_mmap(mm); destroy: __mt_destroy(&mm->mm_mt); + trace_exit_mmap(mm); mmap_write_unlock(mm); vm_unacct_memory(nr_accounted); }