Re: [PATCH] mm/migrate_device: fix spinlock leak in migrate_vma_insert_huge_pmd_page
From: David Hildenbrand (Arm)
Date: Mon Apr 27 2026 - 06:20:57 EST
On 4/25/26 15:35, Sunny Patel wrote:
> When check_stable_address_space() fails after the PMD spinlock has
> been acquired via pmd_lock(), the code jumps directly to the abort
> label, bypassing the spin_unlock() call in unlock_abort. This causes
> the PMD spinlock to be permanently held, leading to a deadlock.
>
> Change the goto target from abort to unlock_abort to ensure the
> spinlock is always released on this error path.
>
> Signed-off-by: Sunny Patel <nueralspacetech@xxxxxxxxx>
> ---
Thanks!
Acked-by: David Hildenbrand (Arm) <david@xxxxxxxxxx>
--
Cheers,
David