CC: [email protected] TO: Peter Zijlstra <[email protected]>
tree: https://git.kernel.org/pub/scm/linux/kernel/git/peterz/queue.git master head: 855f695048dbed44a7d9574a7e3d65c4637ea39d commit: 0cee7807ddccacebbca1a9b40894e904682066e9 [6/13] Merge branch 'sched/core-sched' :::::: branch date: 4 hours ago :::::: commit date: 4 hours ago config: x86_64-randconfig-s021-20210504 (attached as .config) compiler: gcc-9 (Debian 9.3.0-22) 9.3.0 reproduce: # apt-get install sparse # sparse version: v0.6.3-341-g8af24329-dirty # https://git.kernel.org/pub/scm/linux/kernel/git/peterz/queue.git/commit/?id=0cee7807ddccacebbca1a9b40894e904682066e9 git remote add peterz-queue https://git.kernel.org/pub/scm/linux/kernel/git/peterz/queue.git git fetch --no-tags peterz-queue master git checkout 0cee7807ddccacebbca1a9b40894e904682066e9 # save the attached .config to linux build tree make W=1 C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' W=1 ARCH=x86_64 If you fix the issue, kindly add following tag as appropriate Reported-by: kernel test robot <[email protected]> sparse warnings: (new ones prefixed by >>) kernel/sched/psi.c:1249:9: sparse: sparse: incompatible types in comparison expression (different address spaces): kernel/sched/psi.c:1249:9: sparse: void [noderef] __rcu * kernel/sched/psi.c:1249:9: sparse: void * kernel/sched/psi.c:731:13: sparse: sparse: dereference of noderef expression kernel/sched/psi.c:751:30: sparse: sparse: dereference of noderef expression >> kernel/sched/psi.c:973:6: sparse: sparse: context imbalance in >> 'cgroup_move_task' - different lock contexts for basic block vim +/cgroup_move_task +973 kernel/sched/psi.c 2ce7135adc9ad0 Johannes Weiner 2018-10-26 960 2ce7135adc9ad0 Johannes Weiner 2018-10-26 961 /** 2ce7135adc9ad0 Johannes Weiner 2018-10-26 962 * cgroup_move_task - move task to a different cgroup 2ce7135adc9ad0 Johannes Weiner 2018-10-26 963 * @task: the task 2ce7135adc9ad0 Johannes Weiner 2018-10-26 964 * @to: the target css_set 2ce7135adc9ad0 Johannes Weiner 2018-10-26 965 * 2ce7135adc9ad0 Johannes Weiner 2018-10-26 966 * Move task to a new cgroup and safely migrate its associated stall 2ce7135adc9ad0 Johannes Weiner 2018-10-26 967 * state between the different groups. 2ce7135adc9ad0 Johannes Weiner 2018-10-26 968 * 2ce7135adc9ad0 Johannes Weiner 2018-10-26 969 * This function acquires the task's rq lock to lock out concurrent 2ce7135adc9ad0 Johannes Weiner 2018-10-26 970 * changes to the task's scheduling state and - in case the task is 2ce7135adc9ad0 Johannes Weiner 2018-10-26 971 * running - concurrent changes to its stall state. 2ce7135adc9ad0 Johannes Weiner 2018-10-26 972 */ 2ce7135adc9ad0 Johannes Weiner 2018-10-26 @973 void cgroup_move_task(struct task_struct *task, struct css_set *to) 2ce7135adc9ad0 Johannes Weiner 2018-10-26 974 { ea3e5f897bbc91 Johannes Weiner 2021-05-03 975 unsigned int task_flags; 2ce7135adc9ad0 Johannes Weiner 2018-10-26 976 struct rq_flags rf; 2ce7135adc9ad0 Johannes Weiner 2018-10-26 977 struct rq *rq; 2ce7135adc9ad0 Johannes Weiner 2018-10-26 978 e0c274472d5d27 Johannes Weiner 2018-11-30 979 if (static_branch_likely(&psi_disabled)) { 8fcb2312d1e330 Olof Johansson 2018-11-16 980 /* 8fcb2312d1e330 Olof Johansson 2018-11-16 981 * Lame to do this here, but the scheduler cannot be locked 8fcb2312d1e330 Olof Johansson 2018-11-16 982 * from the outside, so we move cgroups from inside sched/. 8fcb2312d1e330 Olof Johansson 2018-11-16 983 */ 8fcb2312d1e330 Olof Johansson 2018-11-16 984 rcu_assign_pointer(task->cgroups, to); 8fcb2312d1e330 Olof Johansson 2018-11-16 985 return; 8fcb2312d1e330 Olof Johansson 2018-11-16 986 } 8fcb2312d1e330 Olof Johansson 2018-11-16 987 2ce7135adc9ad0 Johannes Weiner 2018-10-26 988 rq = task_rq_lock(task, &rf); 2ce7135adc9ad0 Johannes Weiner 2018-10-26 989 ea3e5f897bbc91 Johannes Weiner 2021-05-03 990 /* ea3e5f897bbc91 Johannes Weiner 2021-05-03 991 * We may race with schedule() dropping the rq lock between ea3e5f897bbc91 Johannes Weiner 2021-05-03 992 * deactivating prev and switching to next. Because the psi ea3e5f897bbc91 Johannes Weiner 2021-05-03 993 * updates from the deactivation are deferred to the switch ea3e5f897bbc91 Johannes Weiner 2021-05-03 994 * callback to save cgroup tree updates, the task's scheduling ea3e5f897bbc91 Johannes Weiner 2021-05-03 995 * state here is not coherent with its psi state: ea3e5f897bbc91 Johannes Weiner 2021-05-03 996 * ea3e5f897bbc91 Johannes Weiner 2021-05-03 997 * schedule() cgroup_move_task() ea3e5f897bbc91 Johannes Weiner 2021-05-03 998 * rq_lock() ea3e5f897bbc91 Johannes Weiner 2021-05-03 999 * deactivate_task() ea3e5f897bbc91 Johannes Weiner 2021-05-03 1000 * p->on_rq = 0 ea3e5f897bbc91 Johannes Weiner 2021-05-03 1001 * psi_dequeue() // defers TSK_RUNNING & TSK_IOWAIT updates ea3e5f897bbc91 Johannes Weiner 2021-05-03 1002 * pick_next_task() ea3e5f897bbc91 Johannes Weiner 2021-05-03 1003 * rq_unlock() ea3e5f897bbc91 Johannes Weiner 2021-05-03 1004 * rq_lock() ea3e5f897bbc91 Johannes Weiner 2021-05-03 1005 * psi_task_change() // old cgroup ea3e5f897bbc91 Johannes Weiner 2021-05-03 1006 * task->cgroups = to ea3e5f897bbc91 Johannes Weiner 2021-05-03 1007 * psi_task_change() // new cgroup ea3e5f897bbc91 Johannes Weiner 2021-05-03 1008 * rq_unlock() ea3e5f897bbc91 Johannes Weiner 2021-05-03 1009 * rq_lock() ea3e5f897bbc91 Johannes Weiner 2021-05-03 1010 * psi_sched_switch() // does deferred updates in new cgroup ea3e5f897bbc91 Johannes Weiner 2021-05-03 1011 * ea3e5f897bbc91 Johannes Weiner 2021-05-03 1012 * Don't rely on the scheduling state. Use psi_flags instead. ea3e5f897bbc91 Johannes Weiner 2021-05-03 1013 */ ea3e5f897bbc91 Johannes Weiner 2021-05-03 1014 task_flags = task->psi_flags; 2ce7135adc9ad0 Johannes Weiner 2018-10-26 1015 2ce7135adc9ad0 Johannes Weiner 2018-10-26 1016 if (task_flags) 2ce7135adc9ad0 Johannes Weiner 2018-10-26 1017 psi_task_change(task, task_flags, 0); 2ce7135adc9ad0 Johannes Weiner 2018-10-26 1018 8fcb2312d1e330 Olof Johansson 2018-11-16 1019 /* See comment above */ 2ce7135adc9ad0 Johannes Weiner 2018-10-26 1020 rcu_assign_pointer(task->cgroups, to); 2ce7135adc9ad0 Johannes Weiner 2018-10-26 1021 2ce7135adc9ad0 Johannes Weiner 2018-10-26 1022 if (task_flags) 2ce7135adc9ad0 Johannes Weiner 2018-10-26 1023 psi_task_change(task, 0, task_flags); 2ce7135adc9ad0 Johannes Weiner 2018-10-26 1024 2ce7135adc9ad0 Johannes Weiner 2018-10-26 1025 task_rq_unlock(rq, task, &rf); 2ce7135adc9ad0 Johannes Weiner 2018-10-26 1026 } 2ce7135adc9ad0 Johannes Weiner 2018-10-26 1027 #endif /* CONFIG_CGROUPS */ 2ce7135adc9ad0 Johannes Weiner 2018-10-26 1028 :::::: The code at line 973 was first introduced by commit :::::: 2ce7135adc9ad081aa3c49744144376ac74fea60 psi: cgroup support :::::: TO: Johannes Weiner <[email protected]> :::::: CC: Linus Torvalds <[email protected]> --- 0-DAY CI Kernel Test Service, Intel Corporation https://lists.01.org/hyperkitty/list/[email protected]
.config.gz
Description: application/gzip
_______________________________________________ kbuild mailing list -- [email protected] To unsubscribe send an email to [email protected]
