* Re: [PATCH] sched_ext: Use kobject_put() for kobject_init_and_add() failure in scx_alloc_and_add_sched() [not found] <20260314134457.46216-1-devnexen@gmail.com> @ 2026-03-16 5:43 ` Tejun Heo 2026-03-16 6:36 ` David CARLIER 0 siblings, 1 reply; 2+ messages in thread From: Tejun Heo @ 2026-03-16 5:43 UTC (permalink / raw) To: David Carlier Cc: David Vernet, Andrea Righi, sched-ext, linux-kernel, Emil Tsalapatis 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@kernel.org Thanks. -- tejun ^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH] sched_ext: Use kobject_put() for kobject_init_and_add() failure in scx_alloc_and_add_sched() 2026-03-16 5:43 ` [PATCH] sched_ext: Use kobject_put() for kobject_init_and_add() failure in scx_alloc_and_add_sched() Tejun Heo @ 2026-03-16 6:36 ` David CARLIER 0 siblings, 0 replies; 2+ messages in thread From: David CARLIER @ 2026-03-16 6:36 UTC (permalink / raw) To: Tejun Heo Cc: David Vernet, Andrea Righi, sched-ext, linux-kernel, Emil Tsalapatis ah yes I ve seen your patchset, it is better indeed. Cheers. On Mon, 16 Mar 2026 at 05:43, Tejun Heo <tj@kernel.org> 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@kernel.org > > Thanks. > -- > tejun ^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2026-03-16 6:36 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <20260314134457.46216-1-devnexen@gmail.com>
2026-03-16 5:43 ` [PATCH] sched_ext: Use kobject_put() for kobject_init_and_add() failure in scx_alloc_and_add_sched() Tejun Heo
2026-03-16 6:36 ` David CARLIER
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox