From: kernel test robot <lkp@intel.com>
To: "Matthew Wilcox (Oracle)" <willy@infradead.org>
Cc: llvm@lists.linux.dev, oe-kbuild-all@lists.linux.dev
Subject: Re: [RFC PATCH 2/3] mm: Create snapshot_page()
Date: Tue, 11 Feb 2025 20:37:11 +0800 [thread overview]
Message-ID: <202502112000.w8too7ue-lkp@intel.com> (raw)
In-Reply-To: <20250210212142.4002210-3-willy@infradead.org>
Hi Matthew,
[This is a private test report for your RFC patch.]
kernel test robot noticed the following build warnings:
[auto build test WARNING on akpm-mm/mm-everything]
[also build test WARNING on brauner-vfs/vfs.all linus/master v6.14-rc2 next-20250210]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]
url: https://github.com/intel-lab-lkp/linux/commits/Matthew-Wilcox-Oracle/mm-Constify-folio_mapping-and-swapcache_mapping/20250211-052512
base: https://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm.git mm-everything
patch link: https://lore.kernel.org/r/20250210212142.4002210-3-willy%40infradead.org
patch subject: [RFC PATCH 2/3] mm: Create snapshot_page()
config: i386-buildonly-randconfig-006-20250211 (https://download.01.org/0day-ci/archive/20250211/202502112000.w8too7ue-lkp@intel.com/config)
compiler: clang version 19.1.3 (https://github.com/llvm/llvm-project ab51eccf88f5321e7c60591c5546b254b6afab99)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250211/202502112000.w8too7ue-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/202502112000.w8too7ue-lkp@intel.com/
All warnings (new ones prefixed by >>):
>> mm/util.c:1275:6: warning: variable 'idx' is uninitialized when used here [-Wuninitialized]
1275 | if (idx < MAX_FOLIO_NR_PAGES || folio_test_hugetlb(folio)) {
| ^~~
mm/util.c:1256:19: note: initialize the variable 'idx' to silence this warning
1256 | unsigned long idx, nr_pages = 1;
| ^
| = 0
1 warning generated.
vim +/idx +1275 mm/util.c
1242
1243 /*
1244 * If you have an unstable reference to a page, use this to get a
1245 * somewhat-consistent (potentially outdated) snapshot. The consistency
1246 * is limited to the page being contained in the folio. You need to pass in
1247 * a scratch folio and scratch page, probably allocated on the stack.
1248 * You get back a pointer to the scratch folio you passed in, marked
1249 * as const to remind you not to modify this.
1250 */
1251 const struct folio *snapshot_page(struct folio *foliop, struct page *precise,
1252 unsigned long *idxp, const struct page *unstable)
1253 {
1254 struct folio *folio;
1255 unsigned long head;
1256 unsigned long idx, nr_pages = 1;
1257 int loops = 5;
1258
1259 again:
1260 memcpy(precise, unstable, sizeof(struct page));
1261 head = precise->compound_head;
1262 /* Open-coded !PageTail because page_is_fake_head() doesn't work here */
1263 if ((head & 1) == 0) {
1264 folio = (struct folio *)precise;
1265 *idxp = 0;
1266 /* Not a tail, not a head, we have a single page */
1267 if (!folio_test_large(folio))
1268 goto out;
1269 folio = (struct folio *)unstable;
1270 } else {
1271 folio = (struct folio *)(head - 1);
1272 *idxp = folio_page_idx(folio, unstable);
1273 }
1274
> 1275 if (idx < MAX_FOLIO_NR_PAGES || folio_test_hugetlb(folio)) {
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
parent reply other threads:[~2025-02-11 12:38 UTC|newest]
Thread overview: expand[flat|nested] mbox.gz Atom feed
[parent not found: <20250210212142.4002210-3-willy@infradead.org>]
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=202502112000.w8too7ue-lkp@intel.com \
--to=lkp@intel.com \
--cc=llvm@lists.linux.dev \
--cc=oe-kbuild-all@lists.linux.dev \
--cc=willy@infradead.org \
/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