From: Fushuai Wang <fushuai.wang@linux.dev>
To: fushuai.wang@linux.dev
Cc: bsegall@google.com, dietmar.eggemann@arm.com,
juri.lelli@redhat.com, kprateek.nayak@amd.com,
linux-kernel@vger.kernel.org, mgorman@suse.de, mingo@redhat.com,
peterz@infradead.org, rostedt@goodmis.org, sshegde@linux.ibm.com,
vincent.guittot@linaro.org, vschneid@redhat.com,
wangfushuai@baidu.com
Subject: Re: [PATCH] sched/core: Fix a TOCTOU bug in sched_non_preferred_cpu_push_stop()
Date: Tue, 17 Nov 2026 12:31:03 +0800 [thread overview]
Message-ID: <20261117043103.16267-1-fushuai.wang@linux.dev> (raw)
In-Reply-To: <20261110032117.44762-1-fushuai.wang@linux.dev>
> I think the biggest difference of sched_push_current_non_preferred_cpu() and
> balance_push() is that sched_push_current_non_preferred_cpu() runs in irq context
> while balance_push() runs in task context.
>
> So, a balance_push() path be like:
> task context:
> migrate_disable()
> preempt_disable()
> migration_disabled = 1
> preempt_enable()
> is_migration_disabled()
>
> While a sched_push_current_non_preferred_cpu() path be like:
> task context: irq context:
> migrate_disable()
> preempt_disable()
> is_migration_disabled()
> migration_disabled = 1
> preempt_enable()
> So I think a recheck is necessary.
Ping.
Regards,
Fushuai.
prev parent reply other threads:[~2026-11-17 4:31 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-09 8:31 Fushuai Wang
2026-11-09 14:02 ` Shrikanth Hegde
2026-11-10 3:21 ` Fushuai Wang
2026-11-17 4:31 ` Fushuai Wang [this message]
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=20261117043103.16267-1-fushuai.wang@linux.dev \
--to=fushuai.wang@linux.dev \
--cc=bsegall@google.com \
--cc=dietmar.eggemann@arm.com \
--cc=juri.lelli@redhat.com \
--cc=kprateek.nayak@amd.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mgorman@suse.de \
--cc=mingo@redhat.com \
--cc=peterz@infradead.org \
--cc=rostedt@goodmis.org \
--cc=sshegde@linux.ibm.com \
--cc=vincent.guittot@linaro.org \
--cc=vschneid@redhat.com \
--cc=wangfushuai@baidu.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®