* Re: [RFC PATCH 2/3] mm: Create snapshot_page()
[not found] <20250210212142.4002210-3-willy@infradead.org>
@ 2025-02-11 12:37 ` kernel test robot
0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2025-02-11 12:37 UTC (permalink / raw)
To: Matthew Wilcox (Oracle); +Cc: llvm, oe-kbuild-all
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
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2025-02-11 12:38 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <20250210212142.4002210-3-willy@infradead.org>
2025-02-11 12:37 ` [RFC PATCH 2/3] mm: Create snapshot_page() 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