From: Andrea Righi <arighi@nvidia.com>
To: kernel test robot <lkp@intel.com>
Cc: K Prateek Nayak <kprateek.nayak@amd.com>,
oe-kbuild-all@lists.linux.dev,
Peter Zijlstra <peterz@infradead.org>
Subject: Re: [peterz-queue:sched/core 6/9] kernel/sched/topology.c:2705:25: sparse: sparse: incorrect type in assignment (different address spaces)
Date: Thu, 14 May 2026 19:17:15 +0200 [thread overview]
Message-ID: <agYDm_yLG3pgNNRc@gpd4> (raw)
In-Reply-To: <202605142117.gyxGm7SY-lkp@intel.com>
On Thu, May 14, 2026 at 09:13:09PM +0800, kernel test robot wrote:
> tree: https://git.kernel.org/pub/scm/linux/kernel/git/peterz/queue.git sched/core
> head: 238b6f2b3a4948ca7048025a15874b2c253a34bf
> commit: c3d608e99c540bb4a68f31a1e0dffa7af2827216 [6/9] sched/fair: Attach sched_domain_shared to sd_asym_cpucapacity
> config: nios2-randconfig-r123-20260514 (https://download.01.org/0day-ci/archive/20260514/202605142117.gyxGm7SY-lkp@intel.com/config)
> compiler: nios2-linux-gcc (GCC) 8.5.0
> sparse: v0.6.5-rc1
> reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20260514/202605142117.gyxGm7SY-lkp@intel.com/reproduce)
>
...
> kernel/sched/build_utility.c: note: in included file:
> kernel/sched/sched.h:2379:25: sparse: sparse: incompatible types in comparison expression (different address spaces):
> kernel/sched/sched.h:2379:25: sparse: struct task_struct [noderef] __rcu *
> kernel/sched/sched.h:2379:25: sparse: struct task_struct *
>
> vim +2705 kernel/sched/topology.c
>
> 2679
> 2680 /*
> 2681 * For asymmetric CPU capacity, attach sched_domain_shared on the innermost
> 2682 * SD_ASYM_CPUCAPACITY_FULL ancestor of @cpu's base domain when that ancestor is
> 2683 * not an overlapping NUMA-built domain (then LLC should claim shared).
> 2684 *
> 2685 * A CPU may lack any FULL ancestor (e.g., exclusive cpuset symmetric island),
> 2686 * then LLC must claim shared instead.
> 2687 *
> 2688 * Note: SD_ASYM_CPUCAPACITY_FULL is only set when all CPU capacity values
> 2689 * are present in the domain span, so the asym domain we attach to cannot
> 2690 * degenerate into a single-capacity group. The relevant edge cases are instead
> 2691 * covered by the caveats above.
> 2692 *
> 2693 * Return true if this CPU's asym path claimed sd->shared, false otherwise.
> 2694 */
> 2695 static bool claim_asym_sched_domain_shared(struct s_data *d, int cpu)
> 2696 {
> 2697 struct sched_domain *sd = *per_cpu_ptr(d->sd, cpu);
> 2698 struct sched_domain *sd_asym;
> 2699
> 2700 if (!sd)
> 2701 return false;
> 2702
> 2703 sd_asym = sd;
> 2704 while (sd_asym && !(sd_asym->flags & SD_ASYM_CPUCAPACITY_FULL))
> > 2705 sd_asym = sd_asym->parent;
This looks like a false positive to me: claim_asym_sched_domain_shared() is only
called from build_sched_domains() and we are walking child -> parent during
sched_domain construction, before the tree is published to RCU readers, so the
code holds exclusive ownership at that point, therefore plain dereference seems
correct.
-Andrea
> 2706
> 2707 if (!sd_asym || (sd_asym->flags & SD_NUMA))
> 2708 return false;
> 2709
> 2710 init_sched_domain_shared(d, sd_asym);
> 2711 return true;
> 2712 }
> 2713
>
> --
> 0-DAY CI Kernel Test Service
> https://github.com/intel/lkp-tests/wiki
prev parent reply other threads:[~2026-05-14 17:17 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-05-14 13:13 [peterz-queue:sched/core 6/9] kernel/sched/topology.c:2705:25: sparse: sparse: incorrect type in assignment (different address spaces) kernel test robot
2026-05-14 17:17 ` Andrea Righi [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=agYDm_yLG3pgNNRc@gpd4 \
--to=arighi@nvidia.com \
--cc=kprateek.nayak@amd.com \
--cc=lkp@intel.com \
--cc=oe-kbuild-all@lists.linux.dev \
--cc=peterz@infradead.org \
/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.