Re: [PATCH] sched_ext: Use kobject_put() for kobject_init_and_add() failure in scx_alloc_and_add_sched()
From: David CARLIER
Date: Mon Mar 16 2026 - 02:36:58 EST
ah yes I ve seen your patchset, it is better indeed.
Cheers.
On Mon, 16 Mar 2026 at 05:43, Tejun Heo <tj@xxxxxxxxxx> wrote:
>
> Hello,
>
> Thanks for pointing this out. Using kobject_put() is the right approach but
> the release callback (scx_sched_free_rcu_work) also calls cgroup_put() on
> sch->cgrp, which was already set at that point, leading to a double-put with
> the caller.
>
> I posted a patchset fixing this along with a pre-existing cgroup double-put
> on the abort path:
>
> https://lore.kernel.org/r/20260316054328.838304-1-tj@xxxxxxxxxx
>
> Thanks.
> --
> tejun