Re: [PATCH 13/32] mm/khugepaged: stop MADV_COLLAPSE on a fatal signal
From: Zi Yan
Date: Mon Nov 30 2026 - 12:14:10 EST
On Sun Nov 29, 2026 at 5:06 AM EST, David Hildenbrand (Arm) wrote:
> A task that gets a fatal signal during MADV_COLLAPSE keeps collapsing
> the rest of the range. Consequently, the exit of the task can be delayed
> for a while for a large range.
>
> Let's fix it by checking for a fatal signal before each PMD, simply
> breaking out of the loop. User space will never see the return value,
> so no need to return -EINTR.
>
> This has low urgency, as it only delays the exit of the task. No need to
> CC stable.
>
> Fixes: 7d8faaf15545 ("mm/madvise: introduce MADV_COLLAPSE sync hugepage collapse")
> Reported-by: Chris Mason <mason@xxxxxxxxxx>
> Signed-off-by: David Hildenbrand (Arm) <david@xxxxxxxxxx>
> ---
> mm/khugepaged.c | 4 ++++
> 1 file changed, 4 insertions(+)
>
Makes sense.
Acked-by: Zi Yan <ziy@xxxxxxxxxx>
--
Best Regards,
Yan, Zi