From: kernel test robot <lkp@intel.com>
To: Mel Gorman <mgorman@suse.de>
Cc: kbuild-all@lists.01.org, linux-kernel@vger.kernel.org,
Andrew Morton <akpm@linux-foundation.org>,
Linux Memory Management List <linux-mm@kvack.org>
Subject: mm/page_alloc.c:984:9: warning: iteration 119304648 invokes undefined behavior
Date: Fri, 20 May 2022 05:14:52 +0800 [thread overview]
Message-ID: <202205200521.65W2rpLt-lkp@intel.com> (raw)
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: b015dcd62b86d298829990f8261d5d154b8d7af5
commit: 44042b4498728f4376e84bae1ac8016d146d850b mm/page_alloc: allow high-order pages to be stored on the per-cpu lists
date: 11 months ago
config: powerpc-randconfig-r002-20220519 (https://download.01.org/0day-ci/archive/20220520/202205200521.65W2rpLt-lkp@intel.com/config)
compiler: powerpc-linux-gcc (GCC) 11.3.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/torvalds/linux.git/commit/?id=44042b4498728f4376e84bae1ac8016d146d850b
git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
git fetch --no-tags linus master
git checkout 44042b4498728f4376e84bae1ac8016d146d850b
# save the config file
mkdir build_dir && cp config build_dir/.config
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.3.0 make.cross W=1 O=build_dir ARCH=powerpc 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 >>):
mm/page_alloc.c:3823:15: warning: no previous prototype for 'should_fail_alloc_page' [-Wmissing-prototypes]
3823 | noinline bool should_fail_alloc_page(gfp_t gfp_mask, unsigned int order)
| ^~~~~~~~~~~~~~~~~~~~~~
{standard input}: Assembler messages:
{standard input}:6471: Error: unrecognized opcode: `wrteei'
{standard input}:6700: Error: unrecognized opcode: `wrtee'
mm/page_alloc.c: In function 'rmqueue.isra':
>> mm/page_alloc.c:984:9: warning: iteration 119304648 invokes undefined behavior [-Waggressive-loop-optimizations]
984 | list_add(&page->lru, &area->free_list[migratetype]);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
mm/page_alloc.c:2305:21: note: within this loop
2305 | while (high > low) {
| ~~~~~^~~~~
{standard input}:9878: Error: unrecognized opcode: `wrteei'
{standard input}:10902: Error: unrecognized opcode: `wrtee'
{standard input}:11103: Error: unrecognized opcode: `wrteei'
{standard input}:11321: Error: unrecognized opcode: `wrtee'
{standard input}:12224: Error: unrecognized opcode: `wrteei'
{standard input}:12816: Error: unrecognized opcode: `wrtee'
{standard input}:12822: Error: unrecognized opcode: `wrteei'
{standard input}:12831: Error: unrecognized opcode: `wrtee'
{standard input}:14310: Error: unrecognized opcode: `wrteei'
{standard input}:14402: Error: unrecognized opcode: `wrteei'
{standard input}:14431: Error: unrecognized opcode: `wrteei'
{standard input}:14476: Error: unrecognized opcode: `wrtee'
{standard input}:14484: Error: unrecognized opcode: `wrtee'
{standard input}:14503: Error: unrecognized opcode: `wrtee'
{standard input}:17180: Error: unrecognized opcode: `wrteei'
{standard input}:17816: Error: unrecognized opcode: `wrtee'
{standard input}:17828: Error: unrecognized opcode: `wrtee'
vim +984 mm/page_alloc.c
5e1f0f098b4649 Mel Gorman 2019-03-05 977
6ab0136310961e Alexander Duyck 2020-04-06 978 /* Used for pages not on another list */
6ab0136310961e Alexander Duyck 2020-04-06 979 static inline void add_to_free_list(struct page *page, struct zone *zone,
6ab0136310961e Alexander Duyck 2020-04-06 980 unsigned int order, int migratetype)
6ab0136310961e Alexander Duyck 2020-04-06 981 {
6ab0136310961e Alexander Duyck 2020-04-06 982 struct free_area *area = &zone->free_area[order];
6ab0136310961e Alexander Duyck 2020-04-06 983
6ab0136310961e Alexander Duyck 2020-04-06 @984 list_add(&page->lru, &area->free_list[migratetype]);
6ab0136310961e Alexander Duyck 2020-04-06 985 area->nr_free++;
6ab0136310961e Alexander Duyck 2020-04-06 986 }
6ab0136310961e Alexander Duyck 2020-04-06 987
:::::: The code at line 984 was first introduced by commit
:::::: 6ab0136310961ebf4b5ecb565f0bf52c233dc093 mm: use zone and order instead of free area in free_list manipulators
:::::: TO: Alexander Duyck <alexander.h.duyck@linux.intel.com>
:::::: CC: Linus Torvalds <torvalds@linux-foundation.org>
--
0-DAY CI Kernel Test Service
https://01.org/lkp
next reply other threads:[~2022-05-19 21:15 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-05-19 21:14 kernel test robot [this message]
2022-05-19 21:28 ` Matthew Wilcox
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=202205200521.65W2rpLt-lkp@intel.com \
--to=lkp@intel.com \
--cc=akpm@linux-foundation.org \
--cc=kbuild-all@lists.01.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=mgorman@suse.de \
/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