All of lore.kernel.org
 help / color / mirror / Atom feed
From: Tejun Heo <tj@kernel.org>
To: Qiurong Fang <fangqiurong@kylinos.cn>
Cc: void@manifault.com, arighi@nvidia.com, changwoo@igalia.com,
	sched-ext@lists.linux.dev
Subject: Re: [PATCH] sched_ext: Delete sub-scheduler kobjects before releasing scx_enable_mutex
Date: Tue, 1 Sep 2026 09:56:51 -1000	[thread overview]
Message-ID: <apcuA5kzwRCu_P-V@slm.duckdns.org> (raw)
In-Reply-To: <20260901102240.2671888-1-fangqiurong@kylinos.cn>

On Tue, Sep 01, 2026 at 06:22:40PM +0800, Qiurong Fang wrote:
> From: fangqiurong <fangqiurong@kylinos.cn>
> 
> The sub-scheduler disable path deletes the scheduler's kobjects after
> releasing scx_enable_mutex, while the root path deletes them before
> releasing it. A concurrent enable on the same cgroup can therefore hit
> kobject_add() with the same "sub-%llu" name still in the hierarchy and
> fail with -EEXIST, tearing down an otherwise healthy scheduler.
> 
> Move the two kobject_del() calls above mutex_unlock() to match the root
> path.

Why is this a problem? The subsched hasn't been fully unloaded yet so if you
try to attach a new one, it's going to fail.

Thanks.

-- 
tejun

  reply	other threads:[~2026-09-01 19:56 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-09-01 10:22 [PATCH] sched_ext: Delete sub-scheduler kobjects before releasing scx_enable_mutex Qiurong Fang
2026-09-01 19:56 ` Tejun Heo [this message]
2026-09-02  3:22   ` Qiurong Fang
2026-09-02  6:02     ` Tejun Heo
2026-09-01 20:17 ` Andrea Righi
  -- strict thread matches above, loose matches on Subject: below --
2026-09-02  6:20 Qiurong Fang

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=apcuA5kzwRCu_P-V@slm.duckdns.org \
    --to=tj@kernel.org \
    --cc=arighi@nvidia.com \
    --cc=changwoo@igalia.com \
    --cc=fangqiurong@kylinos.cn \
    --cc=sched-ext@lists.linux.dev \
    --cc=void@manifault.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.