Re: [PATCH 13/32] mm/khugepaged: stop MADV_COLLAPSE on a fatal signal

From: Jose A. Perez de Azpillaga

Date: Sun Nov 29 2026 - 15:29:43 EST


On 11/29/26 11:06 AM, 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>

LGTM:

Reviewed-by: Jose A. Perez de Azpillaga <azpijr@xxxxxxxxx>

--
cheers,
jose a. p-a