Re: [PATCH v2] mm: memcontrol: don't miss processes whose leader has exited in OOM scans

From: Zhan Xusheng

Date: Wed Oct 28 2026 - 22:07:20 EST


On Wed, Oct 28, 2026 at 02:40:35PM +0000, sashiko-bot@xxxxxxxxxx wrote:
> - [High] mm: memcontrol: missing CSS_TASK_ITER_WITH_DEAD in mem_cgroup_scan_tasks()

css_task_iter_advance() drops PF_EXITING tasks with !signal->live before
it looks at CSS_TASK_ITER_PROCS, so the current code doesn't see such a
victim either. The patch keeps that. The changelog's "until it is
gone" should read "while signal->live is non-zero"; I'll fix it if there
is a v3.

> - [Medium] mm: memcontrol: mem_cgroup_scan_skip() exposes left-behind exiting threads

That needs every remaining thread to be past exit_signals() while
signal->live is still non-zero; once it drops to zero the iterator hides
the left-behind thread too. Without the patch, the left-behind leader
exposes the moved process to the source memcg's scans until then.

Thanks,
Zhan Xusheng