CC: l...@lists.linux.dev CC: kbuild-...@lists.01.org CC: linux-ker...@vger.kernel.org CC: x...@kernel.org TO: Josh Don <josh...@google.com> CC: Peter Zijlstra <pet...@infradead.org> CC: Vincent Guittot <vincent.guit...@linaro.org>
tree: https://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git sched/core head: 234b8ab6476c5edd5262e2ff563de9498d60044a commit: 304000390f88d049c85e9a0958ac5567f38816ee [2/11] sched: Cgroup SCHED_IDLE support :::::: branch date: 6 days ago :::::: commit date: 6 days ago config: mips-randconfig-c004-20210826 (attached as .config) compiler: clang version 14.0.0 (https://github.com/llvm/llvm-project ea08c4cd1c0869ec5024a8bb3f5cdf06ab03ae83) reproduce (this is a W=1 build): wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross chmod +x ~/bin/make.cross # install mips cross compiling tool for clang build # apt-get install binutils-mips-linux-gnu # https://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git/commit/?id=304000390f88d049c85e9a0958ac5567f38816ee git remote add tip https://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git git fetch --no-tags tip sched/core git checkout 304000390f88d049c85e9a0958ac5567f38816ee # save the attached .config to linux build tree COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=mips clang-analyzer If you fix the issue, kindly add following tag as appropriate Reported-by: kernel test robot <l...@intel.com> clang-analyzer warnings: (new ones prefixed by >>) ^ drivers/media/usb/cx231xx/cx231xx-core.c:194:6: note: Assuming field 'direction' is 0 if (req_data->direction) { ^~~~~~~~~~~~~~~~~~~ drivers/media/usb/cx231xx/cx231xx-core.c:194:2: note: Taking false branch if (req_data->direction) { ^ drivers/media/usb/cx231xx/cx231xx-core.c:205:11: note: Calling 'cx231xx_send_vendor_cmd' status = cx231xx_send_vendor_cmd(dev, &ven_req); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/media/usb/cx231xx/cx231xx-core.c:325:2: note: Taking false branch if (dev->state & DEV_DISCONNECTED) ^ drivers/media/usb/cx231xx/cx231xx-core.c:328:7: note: Assuming field 'wLength' is <= URB_MAX_CTRL_SIZE if ((ven_req->wLength > URB_MAX_CTRL_SIZE)) ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/media/usb/cx231xx/cx231xx-core.c:328:2: note: Taking false branch if ((ven_req->wLength > URB_MAX_CTRL_SIZE)) ^ drivers/media/usb/cx231xx/cx231xx-core.c:331:15: note: Field 'direction' is 0 if (ven_req->direction) ^ drivers/media/usb/cx231xx/cx231xx-core.c:331:2: note: Taking false branch if (ven_req->direction) ^ drivers/media/usb/cx231xx/cx231xx-core.c:340:7: note: Assuming field 'wLength' is <= 4 if ((ven_req->wLength > 4) && ((ven_req->bRequest == 0x4) || ^~~~~~~~~~~~~~~~~~~~ drivers/media/usb/cx231xx/cx231xx-core.c:340:29: note: Left side of '&&' is false if ((ven_req->wLength > 4) && ((ven_req->bRequest == 0x4) || ^ drivers/media/usb/cx231xx/cx231xx-core.c:383:9: note: 6th function call argument is an uninitialized value ret = __usb_control_msg(dev, pipe, ven_req->bRequest, ^ drivers/media/usb/cx231xx/cx231xx-core.c:635:2: warning: Value stored to 'status' is never read [clang-analyzer-deadcode.DeadStores] status = cx231xx_read_ctrl_reg(dev, VRT_GET_REGISTER, PWR_CTL_EN, ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/media/usb/cx231xx/cx231xx-core.c:635:2: note: Value stored to 'status' is never read status = cx231xx_read_ctrl_reg(dev, VRT_GET_REGISTER, PWR_CTL_EN, ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/media/usb/cx231xx/cx231xx-core.c:644:2: warning: Value stored to 'status' is never read [clang-analyzer-deadcode.DeadStores] status = cx231xx_write_ctrl_reg(dev, VRT_SET_REGISTER, ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/media/usb/cx231xx/cx231xx-core.c:644:2: note: Value stored to 'status' is never read status = cx231xx_write_ctrl_reg(dev, VRT_SET_REGISTER, ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/media/usb/cx231xx/cx231xx-core.c:649:2: warning: Value stored to 'status' is never read [clang-analyzer-deadcode.DeadStores] status = cx231xx_write_ctrl_reg(dev, VRT_SET_REGISTER, ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/media/usb/cx231xx/cx231xx-core.c:649:2: note: Value stored to 'status' is never read status = cx231xx_write_ctrl_reg(dev, VRT_SET_REGISTER, ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/media/usb/cx231xx/cx231xx-core.c:654:2: warning: Value stored to 'status' is never read [clang-analyzer-deadcode.DeadStores] status = cx231xx_write_ctrl_reg(dev, VRT_SET_REGISTER, ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/media/usb/cx231xx/cx231xx-core.c:654:2: note: Value stored to 'status' is never read status = cx231xx_write_ctrl_reg(dev, VRT_SET_REGISTER, ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Suppressed 1 warnings (1 in non-user code). Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well. 11 warnings generated. kernel/sched/core.c:5216:16: warning: Value stored to 'preempt_disable_ip' during its initialization is never read [clang-analyzer-deadcode.DeadStores] unsigned long preempt_disable_ip = get_preempt_disable_ip(current); ^~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ kernel/sched/core.c:5216:16: note: Value stored to 'preempt_disable_ip' during its initialization is never read unsigned long preempt_disable_ip = get_preempt_disable_ip(current); ^~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ kernel/sched/core.c:5948:3: warning: Value stored to 'rq' is never read [clang-analyzer-deadcode.DeadStores] rq = context_switch(rq, prev, next, &rf); ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ kernel/sched/core.c:5948:3: note: Value stored to 'rq' is never read rq = context_switch(rq, prev, next, &rf); ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ kernel/sched/core.c:8944:3: warning: Value stored to 'ptr' is never read [clang-analyzer-deadcode.DeadStores] ptr += nr_cpu_ids * sizeof(void **); ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ kernel/sched/core.c:8944:3: note: Value stored to 'ptr' is never read ptr += nr_cpu_ids * sizeof(void **); ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Suppressed 8 warnings (3 in non-user code, 5 with check filters). Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well. 2 warnings generated. Suppressed 2 warnings (2 in non-user code). Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well. 2 warnings generated. Suppressed 2 warnings (2 in non-user code). Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well. 4 warnings generated. kernel/sched/cputime.c:570:3: warning: Value stored to 'utime' is never read [clang-analyzer-deadcode.DeadStores] utime = rtime; ^ ~~~~~ kernel/sched/cputime.c:570:3: note: Value stored to 'utime' is never read utime = rtime; ^ ~~~~~ Suppressed 3 warnings (2 in non-user code, 1 with check filters). Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well. 2 warnings generated. Suppressed 2 warnings (2 in non-user code). Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well. 9 warnings generated. >> kernel/sched/fair.c:446:21: warning: Access to field 'my_q' results in a >> dereference of a null pointer (loaded from variable 'se') >> [clang-analyzer-core.NullDereference] if (entity_is_task(se)) ^ kernel/sched/fair.c:7103:14: note: Assuming 'sched_nr_latency' is > field 'nr_running' int scale = cfs_rq->nr_running >= sched_nr_latency; ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ kernel/sched/fair.c:7107:6: note: Assuming the condition is false if (unlikely(se == pse)) ^ include/linux/compiler.h:78:22: note: expanded from macro 'unlikely' # define unlikely(x) __builtin_expect(!!(x), 0) ^~~~~~~~~~~~~~~~~~~~~~~~~~ kernel/sched/fair.c:7107:2: note: Taking false branch if (unlikely(se == pse)) ^ kernel/sched/fair.c:7116:6: note: Assuming the condition is true if (unlikely(throttled_hierarchy(cfs_rq_of(pse)))) ^ include/linux/compiler.h:78:40: note: expanded from macro 'unlikely' # define unlikely(x) __builtin_expect(!!(x), 0) ^~~~ kernel/sched/fair.c:7116:2: note: Taking false branch if (unlikely(throttled_hierarchy(cfs_rq_of(pse)))) ^ kernel/sched/fair.c:7119:29: note: Left side of '&&' is false if (sched_feat(NEXT_BUDDY) && scale && !(wake_flags & WF_FORK)) { ^ kernel/sched/fair.c:7134:6: note: Calling 'test_tsk_need_resched' if (test_tsk_need_resched(curr)) ^~~~~~~~~~~~~~~~~~~~~~~~~~~ include/linux/sched.h:1898:9: note: Assuming the condition is true return unlikely(test_tsk_thread_flag(tsk,TIF_NEED_RESCHED)); ^ include/linux/compiler.h:78:40: note: expanded from macro 'unlikely' # define unlikely(x) __builtin_expect(!!(x), 0) ^~~~ include/linux/sched.h:1898:2: note: Returning zero, which participates in a condition later return unlikely(test_tsk_thread_flag(tsk,TIF_NEED_RESCHED)); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ kernel/sched/fair.c:7134:6: note: Returning from 'test_tsk_need_resched' if (test_tsk_need_resched(curr)) ^~~~~~~~~~~~~~~~~~~~~~~~~~~ kernel/sched/fair.c:7134:2: note: Taking false branch if (test_tsk_need_resched(curr)) ^ kernel/sched/fair.c:7138:43: note: Left side of '&&' is false if (unlikely(task_has_idle_policy(curr)) && ^ kernel/sched/fair.c:7146:15: note: Assuming field 'policy' is equal to 0 if (unlikely(p->policy != SCHED_NORMAL) || !sched_feat(WAKEUP_PREEMPTION)) ^ include/linux/compiler.h:78:42: note: expanded from macro 'unlikely' # define unlikely(x) __builtin_expect(!!(x), 0) ^ kernel/sched/fair.c:7146:6: note: Left side of '||' is false if (unlikely(p->policy != SCHED_NORMAL) || !sched_feat(WAKEUP_PREEMPTION)) ^ include/linux/compiler.h:78:22: note: expanded from macro 'unlikely' # define unlikely(x) __builtin_expect(!!(x), 0) ^ kernel/sched/fair.c:7146:2: note: Taking false branch if (unlikely(p->policy != SCHED_NORMAL) || !sched_feat(WAKEUP_PREEMPTION)) ^ kernel/sched/fair.c:7149:2: note: Value assigned to 'pse' find_matching_se(&se, &pse); ^~~~~~~~~~~~~~~~~~~~~~~~~~~ kernel/sched/fair.c:7150:9: note: Assuming 'pse' is null BUG_ON(!pse); ^ arch/mips/include/asm/bug.h:34:44: note: expanded from macro 'BUG_ON' #define BUG_ON(C) __BUG_ON((unsigned long)(C)) ^ kernel/sched/fair.c:7153:27: note: Passing null pointer value via 1st parameter 'se' pse_is_idle = se_is_idle(pse); ^~~ kernel/sched/fair.c:7153:16: note: Calling 'se_is_idle' pse_is_idle = se_is_idle(pse); ^~~~~~~~~~~~~~~ kernel/sched/fair.c:446:21: note: Access to field 'my_q' results in a dereference of a null pointer (loaded from variable 'se') if (entity_is_task(se)) ^ kernel/sched/sched.h:736:30: note: expanded from macro 'entity_is_task' #define entity_is_task(se) (!se->my_q) ^~ kernel/sched/fair.c:676:15: warning: Value stored to 'nr_running' during its initialization is never read [clang-analyzer-deadcode.DeadStores] unsigned int nr_running = cfs_rq->nr_running; ^~~~~~~~~~ ~~~~~~~~~~~~~~~~~~ kernel/sched/fair.c:676:15: note: Value stored to 'nr_running' during its initialization is never read unsigned int nr_running = cfs_rq->nr_running; ^~~~~~~~~~ ~~~~~~~~~~~~~~~~~~ kernel/sched/fair.c:5959:6: warning: Value stored to 'target' during its initialization is never read [clang-analyzer-deadcode.DeadStores] int target = nr_cpumask_bits; ^~~~~~ kernel/sched/fair.c:5959:6: note: Value stored to 'target' during its initialization is never read int target = nr_cpumask_bits; ^~~~~~ kernel/sched/fair.c:6379:6: warning: 1st function call argument is an uninitialized value [clang-analyzer-core.CallAndMessage] asym_fits_capacity(task_util, target)) ^ kernel/sched/fair.c:6881:14: note: Assuming the condition is false int sync = (wake_flags & WF_SYNC) && !(current->flags & PF_EXITING); vim +446 kernel/sched/fair.c 304000390f88d0 Josh Don 2021-07-29 443 304000390f88d0 Josh Don 2021-07-29 444 static int se_is_idle(struct sched_entity *se) 304000390f88d0 Josh Don 2021-07-29 445 { 304000390f88d0 Josh Don 2021-07-29 @446 if (entity_is_task(se)) 304000390f88d0 Josh Don 2021-07-29 447 return task_has_idle_policy(task_of(se)); 304000390f88d0 Josh Don 2021-07-29 448 return cfs_rq_is_idle(group_cfs_rq(se)); 304000390f88d0 Josh Don 2021-07-29 449 } 304000390f88d0 Josh Don 2021-07-29 450 --- 0-DAY CI Kernel Test Service, Intel Corporation https://lists.01.org/hyperkitty/list/kbuild-...@lists.01.org
.config.gz
Description: application/gzip
_______________________________________________ kbuild mailing list -- kbuild@lists.01.org To unsubscribe send an email to kbuild-le...@lists.01.org