From: kernel test robot <lkp@intel.com>
To: Stephen Rothwell <sfr@canb.auug.org.au>
Cc: kbuild-all@lists.01.org,
Linux Memory Management List <linux-mm@kvack.org>
Subject: [linux-next:master 4211/4212] include/linux/mmzone.h:1431:23: warning: array subscript 32 is outside array bounds of 'struct mem_section[32][1]'
Date: Tue, 8 Feb 2022 09:49:38 +0800 [thread overview]
Message-ID: <202202080910.X71Dr91P-lkp@intel.com> (raw)
tree: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
head: b3c0a155ef77550d48f6eb7c6fdd6075764a5622
commit: 2080104cef88386d398c18976a57cc80fec4291f [4211/4212] Merge branch 'akpm-current/current'
config: arm-randconfig-r034-20220207 (https://download.01.org/0day-ci/archive/20220208/202202080910.X71Dr91P-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=2080104cef88386d398c18976a57cc80fec4291f
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 2080104cef88386d398c18976a57cc80fec4291f
# 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
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/radix-tree.h:12,
from include/linux/fs.h:15,
from include/linux/highmem.h:5,
from net/ceph/messenger.c:6:
net/ceph/messenger.c: In function 'ceph_msgr_init':
>> 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/radix-tree.h:12,
from include/linux/fs.h:15,
from include/linux/highmem.h:5,
from include/linux/bvec.h:10,
from include/linux/blk_types.h:10,
from include/linux/blkdev.h:9,
from drivers/md/dm-kcopyd.c:14:
drivers/md/dm-kcopyd.c: In function 'dm_kcopyd_init':
>> 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 drivers/md/dm-crypt.c:12:
drivers/md/dm-crypt.c: In function 'crypt_iv_eboiv_gen':
>> 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/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];
| ^~~~~~~~~~~
--
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 block/blk-lib.c:6:
block/blk-lib.c: In function '__blkdev_issue_zero_pages':
>> 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 security/keys/encrypted-keys/encrypted.c:15:
security/keys/encrypted-keys/encrypted.c: In function 'derived_key_encrypt.constprop':
>> 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
reply other threads:[~2022-02-08 1:50 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=202202080910.X71Dr91P-lkp@intel.com \
--to=lkp@intel.com \
--cc=kbuild-all@lists.01.org \
--cc=linux-mm@kvack.org \
--cc=sfr@canb.auug.org.au \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox