linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
* [linux-next:master 4438/4439] include/linux/mmzone.h:1431:23: warning: array subscript 32 is outside array bounds of 'struct mem_section[32][1]'
@ 2022-02-08 16:10 kernel test robot
  0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2022-02-08 16:10 UTC (permalink / raw)
  To: Stephen Rothwell; +Cc: kbuild-all, Linux Memory Management List

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
head:   554f92dbda161fa073844ae6c62db257b8860a0a
commit: c052f4a3cbf1f171a3ceedd76b70d6acf2718d34 [4438/4439] Merge branch 'akpm-current/current'
config: arm-randconfig-c002-20220208 (https://download.01.org/0day-ci/archive/20220209/202202090028.zSZDO5zf-lkp@intel.com/config)
compiler: arm-linux-gnueabi-gcc (GCC) 11.2.0
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
        # https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/commit/?id=c052f4a3cbf1f171a3ceedd76b70d6acf2718d34
        git remote add linux-next https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
        git fetch --no-tags linux-next master
        git checkout c052f4a3cbf1f171a3ceedd76b70d6acf2718d34
        # save the config file to linux build tree
        mkdir build_dir
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross O=build_dir ARCH=arm SHELL=/bin/bash fs/

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>

All warnings (new ones prefixed by >>):

   In file included from include/linux/gfp.h:6,
                    from include/linux/umh.h:4,
                    from include/linux/kmod.h:9,
                    from include/linux/module.h:17,
                    from fs/direct-io.c:24:
   fs/direct-io.c: In function 'dio_zero_block':
>> include/linux/mmzone.h:1431:23: warning: array subscript 32 is outside array bounds of 'struct mem_section[32][1]' [-Warray-bounds]
    1431 |         unsigned long map = section->section_mem_map;
         |                       ^~~
   include/linux/mmzone.h:1389:27: note: while referencing 'mem_section'
    1389 | extern struct mem_section mem_section[NR_SECTION_ROOTS][SECTIONS_PER_ROOT];
         |                           ^~~~~~~~~~~
   fs/direct-io.c: In function 'do_direct_IO':
>> include/linux/mmzone.h:1431:23: warning: array subscript 32 is outside array bounds of 'struct mem_section[32][1]' [-Warray-bounds]
    1431 |         unsigned long map = section->section_mem_map;
         |                       ^~~
   include/linux/mmzone.h:1389:27: note: while referencing 'mem_section'
    1389 | extern struct mem_section mem_section[NR_SECTION_ROOTS][SECTIONS_PER_ROOT];
         |                           ^~~~~~~~~~~
--
   In file included from include/linux/gfp.h:6,
                    from include/linux/umh.h:4,
                    from include/linux/kmod.h:9,
                    from include/linux/module.h:17,
                    from fs/iomap/direct-io.c:6:
   fs/iomap/direct-io.c: In function 'iomap_dio_zero':
>> include/linux/mmzone.h:1431:23: warning: array subscript 32 is outside array bounds of 'struct mem_section[32][1]' [-Warray-bounds]
    1431 |         unsigned long map = section->section_mem_map;
         |                       ^~~
   include/linux/mmzone.h:1389:27: note: while referencing 'mem_section'
    1389 | extern struct mem_section mem_section[NR_SECTION_ROOTS][SECTIONS_PER_ROOT];
         |                           ^~~~~~~~~~~


vim +1431 include/linux/mmzone.h

29751f6991e845 Andy Whitcroft 2005-06-23  1428  
29751f6991e845 Andy Whitcroft 2005-06-23  1429  static inline struct page *__section_mem_map_addr(struct mem_section *section)
29751f6991e845 Andy Whitcroft 2005-06-23  1430  {
29751f6991e845 Andy Whitcroft 2005-06-23 @1431  	unsigned long map = section->section_mem_map;
29751f6991e845 Andy Whitcroft 2005-06-23  1432  	map &= SECTION_MAP_MASK;
29751f6991e845 Andy Whitcroft 2005-06-23  1433  	return (struct page *)map;
29751f6991e845 Andy Whitcroft 2005-06-23  1434  }
29751f6991e845 Andy Whitcroft 2005-06-23  1435  

:::::: The code at line 1431 was first introduced by commit
:::::: 29751f6991e845f7d002a6ae520bf996b38c8dcd [PATCH] sparsemem hotplug base

:::::: TO: Andy Whitcroft <apw@shadowen.org>
:::::: CC: Linus Torvalds <torvalds@ppc970.osdl.org>

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2022-02-08 16:13 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-02-08 16:10 [linux-next:master 4438/4439] include/linux/mmzone.h:1431:23: warning: array subscript 32 is outside array bounds of 'struct mem_section[32][1]' 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;
as well as URLs for NNTP newsgroup(s).