Re: [PATCH v2] cgroup: Avoid iteration of dying tasks with zero refcount
From: Michal Koutný
Date: Fri Sep 11 2026 - 12:43:03 EST
On Tue, Sep 08, 2026 at 05:55:45PM +0200, Michal Koutný <mkoutny@xxxxxxxx> wrote:
> Though, the fix loses a bit of elegance. Hm, thinking...
So, it occurs to me that the ->live based predicate from v2 might break
CSS_TASK_ITER_WITH_DEAD callers (zombies they asked for would be
skipped).
We need to distinguish between (both on dying_tasks list):
- regular zombies waiting to be reaped and
- RCU remnant tasks that are going to be free'd.
IIUC these two are split on the ->usage count. (Correct me if I'm
wrong.)
I'm starting to like the tryget_task_struct() approach from v1 again.
Michal
Attachment:
signature.asc
Description: PGP signature