* [linux-next:master 6144/6333] include/linux/bitmap.h:245:22: warning: array subscript 0 is outside array bounds of 'struct cpumask[0]'
@ 2023-09-19 14:05 kernel test robot
0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2023-09-19 14:05 UTC (permalink / raw)
To: Waiman Long; +Cc: oe-kbuild-all, Linux Memory Management List, Tejun Heo
tree: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
head: 29e400e3ea486bf942b214769fc9778098114113
commit: e2ffe502ba4505ee9c7b432980c702b7801a37f3 [6144/6333] cgroup/cpuset: Add cpuset.cpus.exclusive for v2
config: i386-randconfig-013-20230914 (https://download.01.org/0day-ci/archive/20230919/202309192149.5OtHmIo1-lkp@intel.com/config)
compiler: gcc-12 (Debian 12.2.0-14) 12.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20230919/202309192149.5OtHmIo1-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@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202309192149.5OtHmIo1-lkp@intel.com/
All warnings (new ones prefixed by >>):
In file included from include/linux/cpumask.h:12,
from arch/x86/include/asm/cpumask.h:5,
from arch/x86/include/asm/msr.h:11,
from arch/x86/include/asm/processor.h:23,
from arch/x86/include/asm/cpufeature.h:5,
from arch/x86/include/asm/thread_info.h:53,
from include/linux/thread_info.h:60,
from arch/x86/include/asm/preempt.h:9,
from include/linux/preempt.h:79,
from include/linux/rcupdate.h:27,
from include/linux/rculist.h:11,
from include/linux/pid.h:5,
from include/linux/sched.h:14,
from include/linux/ratelimit.h:6,
from include/linux/dev_printk.h:16,
from include/linux/device.h:15,
from include/linux/node.h:18,
from include/linux/cpu.h:17,
from kernel/cgroup/cpuset.c:25:
In function 'bitmap_zero',
inlined from 'cpumask_clear' at include/linux/cpumask.h:554:2,
inlined from 'zalloc_cpumask_var' at include/linux/cpumask.h:931:2,
inlined from 'alloc_cpumasks.constprop' at kernel/cgroup/cpuset.c:627:7:
>> include/linux/bitmap.h:245:22: warning: array subscript 0 is outside array bounds of 'struct cpumask[0]' [-Warray-bounds]
245 | *dst = 0;
| ~~~~~^~~
In function 'bitmap_zero',
inlined from 'cpumask_clear' at include/linux/cpumask.h:554:2,
inlined from 'zalloc_cpumask_var' at include/linux/cpumask.h:931:2,
inlined from 'alloc_cpumasks.constprop' at kernel/cgroup/cpuset.c:633:7:
>> include/linux/bitmap.h:245:22: warning: array subscript 0 is outside array bounds of 'struct cpumask[0]' [-Warray-bounds]
245 | *dst = 0;
| ~~~~~^~~
vim +245 include/linux/bitmap.h
^1da177e4c3f41 Linus Torvalds 2005-04-16 239
8b4daad52fee77 Rasmus Villemoes 2015-02-12 240 static inline void bitmap_zero(unsigned long *dst, unsigned int nbits)
^1da177e4c3f41 Linus Torvalds 2005-04-16 241 {
8b4daad52fee77 Rasmus Villemoes 2015-02-12 242 unsigned int len = BITS_TO_LONGS(nbits) * sizeof(unsigned long);
3e7e5baaaba780 Alexander Lobakin 2022-06-24 243
3e7e5baaaba780 Alexander Lobakin 2022-06-24 244 if (small_const_nbits(nbits))
3e7e5baaaba780 Alexander Lobakin 2022-06-24 @245 *dst = 0;
3e7e5baaaba780 Alexander Lobakin 2022-06-24 246 else
^1da177e4c3f41 Linus Torvalds 2005-04-16 247 memset(dst, 0, len);
^1da177e4c3f41 Linus Torvalds 2005-04-16 248 }
^1da177e4c3f41 Linus Torvalds 2005-04-16 249
:::::: The code at line 245 was first introduced by commit
:::::: 3e7e5baaaba78075a7f3a57432609e363bf2a486 bitmap: don't assume compiler evaluates small mem*() builtins calls
:::::: TO: Alexander Lobakin <alexandr.lobakin@intel.com>
:::::: CC: Yury Norov <yury.norov@gmail.com>
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2023-09-19 14:06 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-09-19 14:05 [linux-next:master 6144/6333] include/linux/bitmap.h:245:22: warning: array subscript 0 is outside array bounds of 'struct cpumask[0]' kernel test robot
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox