CC: [email protected] CC: [email protected] CC: [email protected] TO: Atish Patra <[email protected]> CC: Palmer Dabbelt <[email protected]> CC: Greentime Hu <[email protected]> CC: Anup Patel <[email protected]>
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master head: 6b75d88fa81b122cce37ebf17428a849ccd3d0f1 commit: 4f0e8eef772ee4438f304b2178bc28c958b6c13d riscv: Add numa support for riscv64 platform date: 10 months ago :::::: branch date: 7 hours ago :::::: commit date: 10 months ago config: riscv-randconfig-c006-20211017 (attached as .config) compiler: clang version 14.0.0 (https://github.com/llvm/llvm-project 8ca4b3ef19fe82d7ad6a6e1515317dcc01b41515) 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 riscv cross compiling tool for clang build # apt-get install binutils-riscv64-linux-gnu # https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=4f0e8eef772ee4438f304b2178bc28c958b6c13d git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git git fetch --no-tags linus master git checkout 4f0e8eef772ee4438f304b2178bc28c958b6c13d # save the attached .config to linux build tree COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=riscv clang-analyzer If you fix the issue, kindly add following tag as appropriate Reported-by: kernel test robot <[email protected]> clang-analyzer warnings: (new ones prefixed by >>) 6 warnings generated. Suppressed 6 warnings (6 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. 5 warnings generated. Suppressed 5 warnings (5 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. Suppressed 9 warnings (6 in non-user code, 3 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. 8 warnings generated. Suppressed 8 warnings (6 in non-user code, 2 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. 7 warnings generated. Suppressed 7 warnings (5 in non-user code, 2 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. 7 warnings generated. Suppressed 7 warnings (5 in non-user code, 2 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. 7 warnings generated. Suppressed 7 warnings (5 in non-user code, 2 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. 7 warnings generated. Suppressed 7 warnings (5 in non-user code, 2 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. 8 warnings generated. Suppressed 8 warnings (6 in non-user code, 2 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. 6 warnings generated. Suppressed 6 warnings (6 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. 8 warnings generated. Suppressed 8 warnings (8 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. 6 warnings generated. Suppressed 6 warnings (6 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. 6 warnings generated. Suppressed 6 warnings (6 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. Suppressed 9 warnings (9 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. 6 warnings generated. Suppressed 6 warnings (6 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. 8 warnings generated. Suppressed 8 warnings (8 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. 6 warnings generated. Suppressed 6 warnings (6 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. 7 warnings generated. Suppressed 7 warnings (7 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. 8 warnings generated. Suppressed 8 warnings (8 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. 6 warnings generated. Suppressed 6 warnings (6 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. 5 warnings generated. Suppressed 5 warnings (5 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. 6 warnings generated. Suppressed 6 warnings (6 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. 6 warnings generated. Suppressed 6 warnings (6 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. 6 warnings generated. Suppressed 6 warnings (6 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. Suppressed 4 warnings (4 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. 5 warnings generated. Suppressed 5 warnings (5 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. 5 warnings generated. Suppressed 5 warnings (5 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. 5 warnings generated. Suppressed 5 warnings (5 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. Suppressed 4 warnings (4 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. 5 warnings generated. Suppressed 5 warnings (5 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. 5 warnings generated. Suppressed 5 warnings (5 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. 5 warnings generated. Suppressed 5 warnings (5 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. 5 warnings generated. Suppressed 5 warnings (5 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. 13 warnings generated. >> mm/mempolicy.c:251:27: warning: Dereference of null pointer (loaded from >> variable 'nodes') [clang-analyzer-core.NullDereference] pol->w.user_nodemask = *nodes; ^ mm/mempolicy.c:2839:36: note: Passing null pointer value via 3rd parameter 'nodes' do_set_mempolicy(MPOL_DEFAULT, 0, NULL); ^ include/linux/stddef.h:8:14: note: expanded from macro 'NULL' #define NULL ((void *)0) ^~~~~~~~~~~ mm/mempolicy.c:2839:2: note: Calling 'do_set_mempolicy' do_set_mempolicy(MPOL_DEFAULT, 0, NULL); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ mm/mempolicy.c:869:7: note: 'scratch' is non-null if (!scratch) ^~~~~~~ mm/mempolicy.c:869:2: note: Taking false branch if (!scratch) ^ mm/mempolicy.c:873:6: note: Calling 'IS_ERR' if (IS_ERR(new)) { ^~~~~~~~~~~ include/linux/err.h:36:9: note: Assuming the condition is false return IS_ERR_VALUE((unsigned long)ptr); ^ include/linux/err.h:22:34: note: expanded from macro 'IS_ERR_VALUE' #define IS_ERR_VALUE(x) unlikely((unsigned long)(void *)(x) >= (unsigned long)-MAX_ERRNO) ~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/linux/compiler.h:78:42: note: expanded from macro 'unlikely' # define unlikely(x) __builtin_expect(!!(x), 0) ^ include/linux/err.h:36:2: note: Returning zero, which participates in a condition later return IS_ERR_VALUE((unsigned long)ptr); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ mm/mempolicy.c:873:6: note: Returning from 'IS_ERR' if (IS_ERR(new)) { ^~~~~~~~~~~ mm/mempolicy.c:873:2: note: Taking false branch if (IS_ERR(new)) { ^ mm/mempolicy.c:878:31: note: Passing null pointer value via 2nd parameter 'nodes' ret = mpol_set_nodemask(new, nodes, scratch); ^~~~~ mm/mempolicy.c:878:8: note: Calling 'mpol_set_nodemask' ret = mpol_set_nodemask(new, nodes, scratch); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ mm/mempolicy.c:235:6: note: Assuming 'pol' is not equal to NULL if (pol == NULL) ^~~~~~~~~~~ mm/mempolicy.c:235:2: note: Taking false branch if (pol == NULL) ^ mm/mempolicy.c:242:6: note: Assuming field 'mode' is not equal to MPOL_PREFERRED if (pol->mode == MPOL_PREFERRED && nodes_empty(*nodes)) ^~~~~~~~~~~~~~~~~~~~~~~~~~~ mm/mempolicy.c:242:34: note: Left side of '&&' is false if (pol->mode == MPOL_PREFERRED && nodes_empty(*nodes)) ^ mm/mempolicy.c:245:7: note: Assuming the condition is false if (pol->flags & MPOL_F_RELATIVE_NODES) ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ mm/mempolicy.c:245:3: note: Taking false branch if (pol->flags & MPOL_F_RELATIVE_NODES) ^ mm/mempolicy.c:250:7: note: Assuming the condition is true if (mpol_store_user_nodemask(pol)) ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~ mm/mempolicy.c:250:3: note: Taking true branch if (mpol_store_user_nodemask(pol)) ^ mm/mempolicy.c:251:27: note: Dereference of null pointer (loaded from variable 'nodes') pol->w.user_nodemask = *nodes; ^~~~~~ mm/mempolicy.c:1228:10: warning: 3rd function call argument is an uninitialized value [clang-analyzer-core.CallAndMessage] return alloc_huge_page_vma(page_hstate(compound_head(page)), ^ mm/mempolicy.c:1217:2: note: 'address' declared without an initial value unsigned long address; ^~~~~~~~~~~~~~~~~~~~~ mm/mempolicy.c:1220:2: note: Loop condition is false. Execution continues on line 1227 while (vma) { ^ mm/mempolicy.c:1227:6: note: Assuming the condition is true if (PageHuge(page)) { ^~~~~~~~~~~~~~ mm/mempolicy.c:1227:2: note: Taking true branch if (PageHuge(page)) { ^ mm/mempolicy.c:1228:10: note: 3rd function call argument is an uninitialized value return alloc_huge_page_vma(page_hstate(compound_head(page)), ^ mm/mempolicy.c:1243:9: warning: 4th function call argument is an uninitialized value [clang-analyzer-core.CallAndMessage] return alloc_page_vma(GFP_HIGHUSER_MOVABLE | __GFP_RETRY_MAYFAIL, ^ include/linux/gfp.h:566:2: note: expanded from macro 'alloc_page_vma' alloc_pages_vma(gfp_mask, 0, vma, addr, numa_node_id(), false) ^ ~~~~ mm/mempolicy.c:1217:2: note: 'address' declared without an initial value unsigned long address; ^~~~~~~~~~~~~~~~~~~~~ mm/mempolicy.c:1220:2: note: Loop condition is false. Execution continues on line 1227 while (vma) { vim +/nodes +251 mm/mempolicy.c 37012946da9405 David Rientjes 2008-04-28 219 58568d2a8215cb Miao Xie 2009-06-16 220 /* 58568d2a8215cb Miao Xie 2009-06-16 221 * mpol_set_nodemask is called after mpol_new() to set up the nodemask, if 58568d2a8215cb Miao Xie 2009-06-16 222 * any, for the new policy. mpol_new() has already validated the nodes 58568d2a8215cb Miao Xie 2009-06-16 223 * parameter with respect to the policy mode and flags. But, we need to 58568d2a8215cb Miao Xie 2009-06-16 224 * handle an empty nodemask with MPOL_PREFERRED here. 58568d2a8215cb Miao Xie 2009-06-16 225 * 58568d2a8215cb Miao Xie 2009-06-16 226 * Must be called holding task's alloc_lock to protect task's mems_allowed c1e8d7c6a7a682 Michel Lespinasse 2020-06-08 227 * and mempolicy. May also be called holding the mmap_lock for write. 58568d2a8215cb Miao Xie 2009-06-16 228 */ 4bfc44958e499a KAMEZAWA Hiroyuki 2009-08-06 229 static int mpol_set_nodemask(struct mempolicy *pol, 4bfc44958e499a KAMEZAWA Hiroyuki 2009-08-06 230 const nodemask_t *nodes, struct nodemask_scratch *nsc) 58568d2a8215cb Miao Xie 2009-06-16 231 { 58568d2a8215cb Miao Xie 2009-06-16 232 int ret; 58568d2a8215cb Miao Xie 2009-06-16 233 58568d2a8215cb Miao Xie 2009-06-16 234 /* if mode is MPOL_DEFAULT, pol is NULL. This is right. */ 58568d2a8215cb Miao Xie 2009-06-16 235 if (pol == NULL) 58568d2a8215cb Miao Xie 2009-06-16 236 return 0; 01f13bd607346a Lai Jiangshan 2012-12-12 237 /* Check N_MEMORY */ 4bfc44958e499a KAMEZAWA Hiroyuki 2009-08-06 238 nodes_and(nsc->mask1, 01f13bd607346a Lai Jiangshan 2012-12-12 239 cpuset_current_mems_allowed, node_states[N_MEMORY]); 58568d2a8215cb Miao Xie 2009-06-16 240 58568d2a8215cb Miao Xie 2009-06-16 241 VM_BUG_ON(!nodes); 58568d2a8215cb Miao Xie 2009-06-16 242 if (pol->mode == MPOL_PREFERRED && nodes_empty(*nodes)) 58568d2a8215cb Miao Xie 2009-06-16 243 nodes = NULL; /* explicit local allocation */ 58568d2a8215cb Miao Xie 2009-06-16 244 else { 58568d2a8215cb Miao Xie 2009-06-16 245 if (pol->flags & MPOL_F_RELATIVE_NODES) 4bfc44958e499a KAMEZAWA Hiroyuki 2009-08-06 246 mpol_relative_nodemask(&nsc->mask2, nodes, &nsc->mask1); 58568d2a8215cb Miao Xie 2009-06-16 247 else 4bfc44958e499a KAMEZAWA Hiroyuki 2009-08-06 248 nodes_and(nsc->mask2, *nodes, nsc->mask1); 4bfc44958e499a KAMEZAWA Hiroyuki 2009-08-06 249 58568d2a8215cb Miao Xie 2009-06-16 250 if (mpol_store_user_nodemask(pol)) 58568d2a8215cb Miao Xie 2009-06-16 @251 pol->w.user_nodemask = *nodes; 58568d2a8215cb Miao Xie 2009-06-16 252 else 58568d2a8215cb Miao Xie 2009-06-16 253 pol->w.cpuset_mems_allowed = 58568d2a8215cb Miao Xie 2009-06-16 254 cpuset_current_mems_allowed; 58568d2a8215cb Miao Xie 2009-06-16 255 } 58568d2a8215cb Miao Xie 2009-06-16 256 4bfc44958e499a KAMEZAWA Hiroyuki 2009-08-06 257 if (nodes) 4bfc44958e499a KAMEZAWA Hiroyuki 2009-08-06 258 ret = mpol_ops[pol->mode].create(pol, &nsc->mask2); 4bfc44958e499a KAMEZAWA Hiroyuki 2009-08-06 259 else 4bfc44958e499a KAMEZAWA Hiroyuki 2009-08-06 260 ret = mpol_ops[pol->mode].create(pol, NULL); 58568d2a8215cb Miao Xie 2009-06-16 261 return ret; 58568d2a8215cb Miao Xie 2009-06-16 262 } 58568d2a8215cb Miao Xie 2009-06-16 263 :::::: The code at line 251 was first introduced by commit :::::: 58568d2a8215cb6f55caf2332017d7bdff954e1c cpuset,mm: update tasks' mems_allowed in time :::::: TO: Miao Xie <[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]
