lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Message-ID: <202512111218.sqWkmRcc-lkp@intel.com>
Date: Thu, 11 Dec 2025 12:23:54 +0800
From: kernel test robot <lkp@...el.com>
To: Peter Zijlstra <peterz@...radead.org>
Cc: oe-kbuild-all@...ts.linux.dev, linux-kernel@...r.kernel.org,
	Juri Lelli <juri.lelli@...hat.com>,
	Connor O'Brien <connoro@...gle.com>,
	John Stultz <jstultz@...gle.com>, Metin Kaya <metin.kaya@....com>
Subject: kernel/sched/fair.c:8784:37: sparse: sparse: incorrect type in
 argument 1 (different address spaces)

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   8c8081cc599fcafa25371d50959c17e154f9fd08
commit: af0c8b2bf67b25756f27644936e74fd9a6273bd2 sched: Split scheduler and execution contexts
date:   1 year, 2 months ago
config: i386-randconfig-061-20251211 (https://download.01.org/0day-ci/archive/20251211/202512111218.sqWkmRcc-lkp@intel.com/config)
compiler: clang version 20.1.8 (https://github.com/llvm/llvm-project 87f0227cb60147a26a1eeb4fb06e3b505e9c7261)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20251211/202512111218.sqWkmRcc-lkp@intel.com/reproduce)

If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@...el.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202512111218.sqWkmRcc-lkp@intel.com/

sparse warnings: (new ones prefixed by >>)
   kernel/sched/fair.c:1203:39: sparse: sparse: incorrect type in initializer (different address spaces) @@     expected struct task_struct *donor @@     got struct task_struct [noderef] __rcu *donor @@
   kernel/sched/fair.c:1203:39: sparse:     expected struct task_struct *donor
   kernel/sched/fair.c:1203:39: sparse:     got struct task_struct [noderef] __rcu *donor
   kernel/sched/fair.c:1261:34: sparse: sparse: incorrect type in argument 1 (different address spaces) @@     expected struct sched_entity const *se @@     got struct sched_entity [noderef] __rcu * @@
   kernel/sched/fair.c:1261:34: sparse:     expected struct sched_entity const *se
   kernel/sched/fair.c:1261:34: sparse:     got struct sched_entity [noderef] __rcu *
   kernel/sched/fair.c:6833:39: sparse: sparse: incorrect type in initializer (different address spaces) @@     expected struct task_struct *donor @@     got struct task_struct [noderef] __rcu *donor @@
   kernel/sched/fair.c:6833:39: sparse:     expected struct task_struct *donor
   kernel/sched/fair.c:6833:39: sparse:     got struct task_struct [noderef] __rcu *donor
   kernel/sched/fair.c:7036:58: sparse: sparse: incorrect type in argument 2 (different address spaces) @@     expected struct task_struct *p @@     got struct task_struct [noderef] __rcu *curr @@
   kernel/sched/fair.c:7036:58: sparse:     expected struct task_struct *p
   kernel/sched/fair.c:7036:58: sparse:     got struct task_struct [noderef] __rcu *curr
   kernel/sched/fair.c:8753:39: sparse: sparse: incorrect type in initializer (different address spaces) @@     expected struct task_struct *donor @@     got struct task_struct [noderef] __rcu *donor @@
   kernel/sched/fair.c:8753:39: sparse:     expected struct task_struct *donor
   kernel/sched/fair.c:8753:39: sparse:     got struct task_struct [noderef] __rcu *donor
>> kernel/sched/fair.c:8784:37: sparse: sparse: incorrect type in argument 1 (different address spaces) @@     expected struct task_struct *tsk @@     got struct task_struct [noderef] __rcu *curr @@
   kernel/sched/fair.c:8784:37: sparse:     expected struct task_struct *tsk
   kernel/sched/fair.c:8784:37: sparse:     got struct task_struct [noderef] __rcu *curr
   kernel/sched/fair.c:8995:38: sparse: sparse: incorrect type in initializer (different address spaces) @@     expected struct task_struct *curr @@     got struct task_struct [noderef] __rcu *curr @@
   kernel/sched/fair.c:8995:38: sparse:     expected struct task_struct *curr
   kernel/sched/fair.c:8995:38: sparse:     got struct task_struct [noderef] __rcu *curr
   kernel/sched/fair.c:6755:35: sparse: sparse: marked inline, but without a definition
   kernel/sched/fair.c: note: in included file:
   kernel/sched/sched.h:2287:26: sparse: sparse: incompatible types in comparison expression (different address spaces):
   kernel/sched/sched.h:2287:26: sparse:    struct task_struct [noderef] __rcu *
   kernel/sched/sched.h:2287:26: sparse:    struct task_struct *
   kernel/sched/sched.h:2496:9: sparse: sparse: incompatible types in comparison expression (different address spaces):
   kernel/sched/sched.h:2496:9: sparse:    struct task_struct [noderef] __rcu *
   kernel/sched/sched.h:2496:9: sparse:    struct task_struct *
   kernel/sched/sched.h:2287:26: sparse: sparse: incompatible types in comparison expression (different address spaces):
   kernel/sched/sched.h:2287:26: sparse:    struct task_struct [noderef] __rcu *
   kernel/sched/sched.h:2287:26: sparse:    struct task_struct *
   kernel/sched/sched.h:2287:26: sparse: sparse: incompatible types in comparison expression (different address spaces):
   kernel/sched/sched.h:2287:26: sparse:    struct task_struct [noderef] __rcu *
   kernel/sched/sched.h:2287:26: sparse:    struct task_struct *

vim +8784 kernel/sched/fair.c

  8747	
  8748	/*
  8749	 * Preempt the current task with a newly woken task if needed:
  8750	 */
  8751	static void check_preempt_wakeup_fair(struct rq *rq, struct task_struct *p, int wake_flags)
  8752	{
  8753		struct task_struct *donor = rq->donor;
  8754		struct sched_entity *se = &donor->se, *pse = &p->se;
  8755		struct cfs_rq *cfs_rq = task_cfs_rq(donor);
  8756		int cse_is_idle, pse_is_idle;
  8757	
  8758		if (unlikely(se == pse))
  8759			return;
  8760	
  8761		/*
  8762		 * This is possible from callers such as attach_tasks(), in which we
  8763		 * unconditionally wakeup_preempt() after an enqueue (which may have
  8764		 * lead to a throttle).  This both saves work and prevents false
  8765		 * next-buddy nomination below.
  8766		 */
  8767		if (unlikely(throttled_hierarchy(cfs_rq_of(pse))))
  8768			return;
  8769	
  8770		if (sched_feat(NEXT_BUDDY) && !(wake_flags & WF_FORK)) {
  8771			set_next_buddy(pse);
  8772		}
  8773	
  8774		/*
  8775		 * We can come here with TIF_NEED_RESCHED already set from new task
  8776		 * wake up path.
  8777		 *
  8778		 * Note: this also catches the edge-case of curr being in a throttled
  8779		 * group (e.g. via set_curr_task), since update_curr() (in the
  8780		 * enqueue of curr) will have resulted in resched being set.  This
  8781		 * prevents us from potentially nominating it as a false LAST_BUDDY
  8782		 * below.
  8783		 */
> 8784		if (test_tsk_need_resched(rq->curr))
  8785			return;
  8786	
  8787		if (!sched_feat(WAKEUP_PREEMPTION))
  8788			return;
  8789	
  8790		find_matching_se(&se, &pse);
  8791		WARN_ON_ONCE(!pse);
  8792	
  8793		cse_is_idle = se_is_idle(se);
  8794		pse_is_idle = se_is_idle(pse);
  8795	
  8796		/*
  8797		 * Preempt an idle entity in favor of a non-idle entity (and don't preempt
  8798		 * in the inverse case).
  8799		 */
  8800		if (cse_is_idle && !pse_is_idle)
  8801			goto preempt;
  8802		if (cse_is_idle != pse_is_idle)
  8803			return;
  8804	
  8805		/*
  8806		 * BATCH and IDLE tasks do not preempt others.
  8807		 */
  8808		if (unlikely(!normal_policy(p->policy)))
  8809			return;
  8810	
  8811		cfs_rq = cfs_rq_of(se);
  8812		update_curr(cfs_rq);
  8813		/*
  8814		 * If @p has a shorter slice than current and @p is eligible, override
  8815		 * current's slice protection in order to allow preemption.
  8816		 *
  8817		 * Note that even if @p does not turn out to be the most eligible
  8818		 * task at this moment, current's slice protection will be lost.
  8819		 */
  8820		if (do_preempt_short(cfs_rq, pse, se) && se->vlag == se->deadline)
  8821			se->vlag = se->deadline + 1;
  8822	
  8823		/*
  8824		 * If @p has become the most eligible task, force preemption.
  8825		 */
  8826		if (pick_eevdf(cfs_rq) == pse)
  8827			goto preempt;
  8828	
  8829		return;
  8830	
  8831	preempt:
  8832		resched_curr(rq);
  8833	}
  8834	

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ