tree: https://gitee.com/openeuler/kernel.git OLK-5.10 head: 951151c7a27bc2a9436c2c49ae12510c82137ec1 commit: b7772972a0a76efac27078392f3f706914fe2af7 [2600/2600] sched/core: Add cpu.steal_task in cgroup v1 cpu subsystem config: arm64-randconfig-r133-20241227 (https://download.01.org/0day-ci/archive/20241227/202412271614.c7NFJYsk-lkp@i...) compiler: aarch64-linux-gcc (GCC) 14.2.0 reproduce: (https://download.01.org/0day-ci/archive/20241227/202412271614.c7NFJYsk-lkp@i...)
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@intel.com | Closes: https://lore.kernel.org/oe-kbuild-all/202412271614.c7NFJYsk-lkp@intel.com/
sparse warnings: (new ones prefixed by >>) kernel/sched/core.c:635:39: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected struct task_struct *task @@ got struct task_struct [noderef] __rcu *curr @@ kernel/sched/core.c:635:39: sparse: expected struct task_struct *task kernel/sched/core.c:635:39: sparse: got struct task_struct [noderef] __rcu *curr kernel/sched/core.c:705:48: sparse: sparse: incorrect type in argument 2 (different address spaces) @@ expected struct task_struct *p @@ got struct task_struct [noderef] __rcu *curr @@ kernel/sched/core.c:705:48: sparse: expected struct task_struct *p kernel/sched/core.c:705:48: sparse: got struct task_struct [noderef] __rcu *curr kernel/sched/core.c:959:38: sparse: sparse: incorrect type in initializer (different address spaces) @@ expected struct task_struct *curr @@ got struct task_struct [noderef] __rcu *curr @@ kernel/sched/core.c:959:38: sparse: expected struct task_struct *curr kernel/sched/core.c:959:38: sparse: got struct task_struct [noderef] __rcu *curr kernel/sched/core.c:1014:9: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected struct sched_domain *[assigned] sd @@ got struct sched_domain [noderef] __rcu *parent @@ kernel/sched/core.c:1014:9: sparse: expected struct sched_domain *[assigned] sd kernel/sched/core.c:1014:9: sparse: got struct sched_domain [noderef] __rcu *parent kernel/sched/core.c:2067:33: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected struct task_struct *p @@ got struct task_struct [noderef] __rcu *curr @@ kernel/sched/core.c:2067:33: sparse: expected struct task_struct *p kernel/sched/core.c:2067:33: sparse: got struct task_struct [noderef] __rcu *curr kernel/sched/core.c:2067:68: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected struct task_struct *tsk @@ got struct task_struct [noderef] __rcu *curr @@ kernel/sched/core.c:2067:68: sparse: expected struct task_struct *tsk kernel/sched/core.c:2067:68: sparse: got struct task_struct [noderef] __rcu *curr kernel/sched/core.c:2809:17: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected struct sched_domain *[assigned] sd @@ got struct sched_domain [noderef] __rcu *parent @@ kernel/sched/core.c:2809:17: sparse: expected struct sched_domain *[assigned] sd kernel/sched/core.c:2809:17: sparse: got struct sched_domain [noderef] __rcu *parent kernel/sched/core.c:3010:36: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected struct task_struct const *p @@ got struct task_struct [noderef] __rcu *curr @@ kernel/sched/core.c:3010:36: sparse: expected struct task_struct const *p kernel/sched/core.c:3010:36: sparse: got struct task_struct [noderef] __rcu *curr kernel/sched/core.c:4447:38: sparse: sparse: incorrect type in initializer (different address spaces) @@ expected struct task_struct *curr @@ got struct task_struct [noderef] __rcu *curr @@ kernel/sched/core.c:4447:38: sparse: expected struct task_struct *curr kernel/sched/core.c:4447:38: sparse: got struct task_struct [noderef] __rcu *curr kernel/sched/core.c:5341:14: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected struct task_struct *prev @@ got struct task_struct [noderef] __rcu *curr @@ kernel/sched/core.c:5341:14: sparse: expected struct task_struct *prev kernel/sched/core.c:5341:14: sparse: got struct task_struct [noderef] __rcu *curr kernel/sched/core.c:6010:17: sparse: sparse: incompatible types in comparison expression (different address spaces): kernel/sched/core.c:6010:17: sparse: struct task_struct * kernel/sched/core.c:6010:17: sparse: struct task_struct [noderef] __rcu * kernel/sched/core.c:6208:22: sparse: sparse: incompatible types in comparison expression (different address spaces): kernel/sched/core.c:6208:22: sparse: struct task_struct [noderef] __rcu * kernel/sched/core.c:6208:22: sparse: struct task_struct *
kernel/sched/core.c:9822:6: sparse: sparse: symbol 'sched_setsteal' was not declared. Should it be static? kernel/sched/core.c:9854:5: sparse: sparse: symbol 'tg_change_steal' was not declared. Should it be static?
kernel/sched/core.c:10398:25: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected struct task_struct *p @@ got struct task_struct [noderef] __rcu *curr @@ kernel/sched/core.c:10398:25: sparse: expected struct task_struct *p kernel/sched/core.c:10398:25: sparse: got struct task_struct [noderef] __rcu *curr kernel/sched/core.c: note: in included file: kernel/sched/sched.h:1411:17: sparse: sparse: self-comparison always evaluates to true kernel/sched/core.c:460:6: sparse: sparse: context imbalance in 'raw_spin_rq_lock_nested' - wrong count at exit kernel/sched/sched.h:1411:17: sparse: sparse: self-comparison always evaluates to true kernel/sched/core.c:493:23: sparse: sparse: context imbalance in 'raw_spin_rq_trylock' - wrong count at exit kernel/sched/core.c:509:6: sparse: sparse: context imbalance in 'raw_spin_rq_unlock' - unexpected unlock kernel/sched/core.c:547:36: sparse: sparse: context imbalance in '__task_rq_lock' - wrong count at exit kernel/sched/core.c:588:36: sparse: sparse: context imbalance in 'task_rq_lock' - wrong count at exit kernel/sched/core.c: note: in included file: kernel/sched/pelt.h:78:13: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected struct task_struct const *p @@ got struct task_struct [noderef] __rcu *curr @@ kernel/sched/pelt.h:78:13: sparse: expected struct task_struct const *p kernel/sched/pelt.h:78:13: sparse: got struct task_struct [noderef] __rcu *curr kernel/sched/core.c:705:11: sparse: sparse: dereference of noderef expression kernel/sched/core.c:2058:33: sparse: sparse: dereference of noderef expression kernel/sched/core.c:2059:19: sparse: sparse: dereference of noderef expression kernel/sched/core.c:2060:37: sparse: sparse: dereference of noderef expression kernel/sched/core.c: note: in included file: kernel/sched/sched.h:2163:25: sparse: sparse: incompatible types in comparison expression (different address spaces): kernel/sched/sched.h:2163:25: sparse: struct task_struct [noderef] __rcu * kernel/sched/sched.h:2163:25: sparse: struct task_struct * kernel/sched/sched.h:2314:9: sparse: sparse: incompatible types in comparison expression (different address spaces): kernel/sched/sched.h:2314:9: sparse: struct task_struct [noderef] __rcu * kernel/sched/sched.h:2314:9: sparse: struct task_struct * kernel/sched/core.c:2033:38: sparse: sparse: incompatible types in comparison expression (different address spaces): kernel/sched/core.c:2033:38: sparse: struct task_struct [noderef] __rcu * kernel/sched/core.c:2033:38: sparse: struct task_struct const * kernel/sched/sched.h:2163:25: sparse: sparse: incompatible types in comparison expression (different address spaces): kernel/sched/sched.h:2163:25: sparse: struct task_struct [noderef] __rcu * kernel/sched/sched.h:2163:25: sparse: struct task_struct * kernel/sched/sched.h:2314:9: sparse: sparse: incompatible types in comparison expression (different address spaces): kernel/sched/sched.h:2314:9: sparse: struct task_struct [noderef] __rcu * kernel/sched/sched.h:2314:9: sparse: struct task_struct * kernel/sched/sched.h:2314:9: sparse: sparse: incompatible types in comparison expression (different address spaces): kernel/sched/sched.h:2314:9: sparse: struct task_struct [noderef] __rcu * kernel/sched/sched.h:2314:9: sparse: struct task_struct * kernel/sched/sched.h:2163:25: sparse: sparse: incompatible types in comparison expression (different address spaces): kernel/sched/sched.h:2163:25: sparse: struct task_struct [noderef] __rcu * kernel/sched/sched.h:2163:25: sparse: struct task_struct * kernel/sched/sched.h:2314:9: sparse: sparse: incompatible types in comparison expression (different address spaces): kernel/sched/sched.h:2314:9: sparse: struct task_struct [noderef] __rcu * kernel/sched/sched.h:2314:9: sparse: struct task_struct * kernel/sched/sched.h:2163:25: sparse: sparse: incompatible types in comparison expression (different address spaces): kernel/sched/sched.h:2163:25: sparse: struct task_struct [noderef] __rcu * kernel/sched/sched.h:2163:25: sparse: struct task_struct * kernel/sched/sched.h:2314:9: sparse: sparse: incompatible types in comparison expression (different address spaces): kernel/sched/sched.h:2314:9: sparse: struct task_struct [noderef] __rcu * kernel/sched/sched.h:2314:9: sparse: struct task_struct * kernel/sched/sched.h:2163:25: sparse: sparse: incompatible types in comparison expression (different address spaces): kernel/sched/sched.h:2163:25: sparse: struct task_struct [noderef] __rcu * kernel/sched/sched.h:2163:25: sparse: struct task_struct * kernel/sched/sched.h:2314:9: sparse: sparse: incompatible types in comparison expression (different address spaces): kernel/sched/sched.h:2314:9: sparse: struct task_struct [noderef] __rcu * kernel/sched/sched.h:2314:9: sparse: struct task_struct * kernel/sched/sched.h:2163:25: sparse: sparse: incompatible types in comparison expression (different address spaces): kernel/sched/sched.h:2163:25: sparse: struct task_struct [noderef] __rcu * kernel/sched/sched.h:2163:25: sparse: struct task_struct * kernel/sched/sched.h:2314:9: sparse: sparse: incompatible types in comparison expression (different address spaces): kernel/sched/sched.h:2314:9: sparse: struct task_struct [noderef] __rcu * kernel/sched/sched.h:2314:9: sparse: struct task_struct * kernel/sched/sched.h:2163:25: sparse: sparse: incompatible types in comparison expression (different address spaces): kernel/sched/sched.h:2163:25: sparse: struct task_struct [noderef] __rcu * kernel/sched/sched.h:2163:25: sparse: struct task_struct * kernel/sched/sched.h:2314:9: sparse: sparse: incompatible types in comparison expression (different address spaces): kernel/sched/sched.h:2314:9: sparse: struct task_struct [noderef] __rcu * kernel/sched/sched.h:2314:9: sparse: struct task_struct * kernel/sched/sched.h:2163:25: sparse: sparse: incompatible types in comparison expression (different address spaces): kernel/sched/sched.h:2163:25: sparse: struct task_struct [noderef] __rcu * kernel/sched/sched.h:2163:25: sparse: struct task_struct * kernel/sched/sched.h:2314:9: sparse: sparse: incompatible types in comparison expression (different address spaces): kernel/sched/sched.h:2314:9: sparse: struct task_struct [noderef] __rcu * kernel/sched/sched.h:2314:9: sparse: struct task_struct *
vim +/sched_setsteal +9822 kernel/sched/core.c
9821
9822 void sched_setsteal(struct task_struct *tsk, s64 steal_task)
9823 { 9824 struct sched_entity *se = &tsk->se; 9825 int queued, running, queue_flags = 9826 DEQUEUE_SAVE | DEQUEUE_MOVE | DEQUEUE_NOCLOCK; 9827 struct rq_flags rf; 9828 struct rq *rq; 9829 9830 if (se->steal_task == steal_task) 9831 return; 9832 9833 rq = task_rq_lock(tsk, &rf); 9834 9835 running = task_current(rq, tsk); 9836 queued = task_on_rq_queued(tsk); 9837 9838 update_rq_clock(rq); 9839 if (queued) 9840 dequeue_task(rq, tsk, queue_flags); 9841 if (running) 9842 put_prev_task(rq, tsk); 9843 9844 se->steal_task = steal_task; 9845 9846 if (queued) 9847 enqueue_task(rq, tsk, queue_flags); 9848 if (running) 9849 set_next_task(rq, tsk); 9850 9851 task_rq_unlock(rq, tsk, &rf); 9852 } 9853
9854 int tg_change_steal(struct task_group *tg, void *data)
9855 { 9856 struct css_task_iter it; 9857 struct task_struct *tsk; 9858 s64 steal_task = *(s64 *)data; 9859 struct cgroup_subsys_state *css = &tg->css; 9860 9861 tg->steal_task = steal_task; 9862 9863 css_task_iter_start(css, 0, &it); 9864 while ((tsk = css_task_iter_next(&it))) 9865 sched_setsteal(tsk, steal_task); 9866 css_task_iter_end(&it); 9867 9868 return 0; 9869 } 9870