From: Peter Zijlstra <peterz@infradead.org>
To: Sun Jian <sun.jian.kdev@gmail.com>
Cc: mingo@redhat.com, juri.lelli@redhat.com,
vincent.guittot@linaro.org, dietmar.eggemann@arm.com,
rostedt@goodmis.org, bsegall@google.com, mgorman@suse.de,
vschneid@redhat.com, nathan@kernel.org,
nick.desaulniers+lkml@gmail.com, morbo@google.com,
justinstitt@google.com, linux-kernel@vger.kernel.org,
llvm@lists.linux.dev
Subject: Re: [PATCH v2] sched: rcu: fix rq->{curr,donor} address space annotations
Date: Fri, 20 Feb 2026 20:48:36 +0100 [thread overview]
Message-ID: <20260220194836.GP1282955@noisy.programming.kicks-ass.net> (raw)
In-Reply-To: <20260220193353.21870-1-sun.jian.kdev@gmail.com>
On Sat, Feb 21, 2026 at 03:33:53AM +0800, Sun Jian wrote:
> With CONFIG_SCHED_PROXY_EXEC enabled, struct rq::curr and rq::donor are
> annotated as __rcu. Several call sites access these pointers as plain
> struct task_struct * while holding rq locks, which triggers address
> space warnings from sparse.
>
> Fix these sites by dereferencing rq->{curr,donor} with
> rcu_dereference_protected() under rq locks and reusing local pointers,
> and by using rcu_access_pointer() for address-only comparisons.
>
> No functional change intended.
>
> Build/verify:
> make -j$(nproc) O=../out/full-clang-x86_64 LLVM=1 kernel/sched/core.o
> make -j$(nproc) O=../out/full-clang-x86_64 LLVM=1 C=2 CHECK=sparse \
> kernel/sched/{core,pelt,build_policy}.o
>
> Signed-off-by: Sun Jian <sun.jian.kdev@gmail.com>
Yeah, lets not do this. It makes the code horrible.
next prev parent reply other threads:[~2026-02-20 19:48 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-02-14 10:20 [PATCH] sched: rcu: fix rq->{curr,donor} address space annotations Sun Jian
2026-02-14 19:44 ` kernel test robot
2026-02-20 19:33 ` [PATCH v2] " Sun Jian
2026-02-20 19:48 ` Peter Zijlstra [this message]
2026-02-21 1:53 ` sun jian
2026-02-20 23:19 ` kernel test robot
2026-02-20 23:29 ` kernel test robot
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=20260220194836.GP1282955@noisy.programming.kicks-ass.net \
--to=peterz@infradead.org \
--cc=bsegall@google.com \
--cc=dietmar.eggemann@arm.com \
--cc=juri.lelli@redhat.com \
--cc=justinstitt@google.com \
--cc=linux-kernel@vger.kernel.org \
--cc=llvm@lists.linux.dev \
--cc=mgorman@suse.de \
--cc=mingo@redhat.com \
--cc=morbo@google.com \
--cc=nathan@kernel.org \
--cc=nick.desaulniers+lkml@gmail.com \
--cc=rostedt@goodmis.org \
--cc=sun.jian.kdev@gmail.com \
--cc=vincent.guittot@linaro.org \
--cc=vschneid@redhat.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.