Re: [PATCH] sched_ext: Use kobject_put() for kobject_init_and_add() failure in scx_alloc_and_add_sched()
From: Tejun Heo
Date: Mon Mar 16 2026 - 01:43:56 EST
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