Re: [RFC 3/3] mm: process_mrelease: introduce PROCESS_MRELEASE_REAP_KILL flag

From: Michal Hocko

Date: Fri Apr 17 2026 - 03:11:01 EST


On Thu 16-04-26 23:30:09, Minchan Kim wrote:
> If I send the SIGKILL first to satisfy the process_mrelease() requirement,
> we immediately run into the scheduling race condition where the victim can
> enter the exit path before the reaper can set the flag.

Why don't you just grab the mm before you send the signal and then continue
with reaping? You just want to avoid a race where the victim manages to
process fatal signal, start its exit path and mrelease path losing that
race so you rely on the exit path, right?
--
Michal Hocko
SUSE Labs