Re: [PATCH v3 cgroup/for-7.0-fixes] cgroup: Fix cgroup_drain_dying() testing the wrong condition

From: Tejun Heo

Date: Wed Mar 25 2026 - 20:02:11 EST


On Wed, Mar 25, 2026 at 07:06:23PM +0100, Sebastian Andrzej Siewior wrote:
> On 2026-03-25 07:23:48 [-1000], Tejun Heo wrote:
> > cgroup_drain_dying() was using cgroup_is_populated() to test whether there are
> > dying tasks to wait for. cgroup_is_populated() tests nr_populated_csets,
> > nr_populated_domain_children and nr_populated_threaded_children, but
> > cgroup_drain_dying() only needs to care about this cgroup's own tasks - whether
> > there are children is cgroup_destroy_locked()'s concern.
>
>
> Tested-by: Sebastian Andrzej Siewior <bigeasy@xxxxxxxxxxxxx>
>
> The only issue I see is if I delay the irq_work callback by a second.
> Other than that, I don't see any problems.

What issue do you see when delaying it by a second? Just things being slowed
down?

Thanks.

--
tejun