Re: [PATCH] mm/madvise: handle madvise_lock() failure during race unwinding

From: Shakeel Butt
Date: Mon Jun 02 2025 - 16:22:33 EST


On Mon, Jun 02, 2025 at 10:49:26AM -0700, SeongJae Park wrote:
> When unwinding race on -ERESTARTNOINTR handling of process_madvise(),
> madvise_lock() failure is ignored. Check the failure and abort
> remaining works in the case.
>
> Fixes: 4000e3d0a367 ("mm/madvise: remove redundant mmap_lock operations from process_madvise()")
> Cc: stable@xxxxxxxxxx
> Reported-by: Barry Song <21cnbao@xxxxxxxxx>
> Closes: https://lore.kernel.org/CAGsJ_4xJXXO0G+4BizhohSZ4yDteziPw43_uF8nPXPWxUVChzw@xxxxxxxxxxxxxx
> Signed-off-by: SeongJae Park <sj@xxxxxxxxxx>

Reviewed-by: Shakeel Butt <shakeel.butt@xxxxxxxxx>