* [rppt:uffd/refactor/v0.2 8/11] mm/userfaultfd.c:589:7: warning: variable 'ret' is uninitialized when used here
@ 2026-01-19 0:49 kernel test robot
0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2026-01-19 0:49 UTC (permalink / raw)
To: Mike Rapoport (Microsoft); +Cc: llvm, oe-kbuild-all
tree: https://git.kernel.org/pub/scm/linux/kernel/git/rppt/linux.git uffd/refactor/v0.2
head: 2db3a86a6de3247449e068d998305d26481c5522
commit: 629131e835ff52775f59108aa49795ce35e442d4 [8/11] userfaultfd, shmem: use a VMA callback to handle UFFDIO_CONTINUE
config: x86_64-randconfig-016-20260119 (https://download.01.org/0day-ci/archive/20260119/202601190850.lPsTWmiG-lkp@intel.com/config)
compiler: clang version 20.1.8 (https://github.com/llvm/llvm-project 87f0227cb60147a26a1eeb4fb06e3b505e9c7261)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20260119/202601190850.lPsTWmiG-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/202601190850.lPsTWmiG-lkp@intel.com/
All warnings (new ones prefixed by >>):
>> mm/userfaultfd.c:589:7: warning: variable 'ret' is uninitialized when used here [-Wuninitialized]
589 | if (ret == -ENOENT || !folio)
| ^~~
mm/userfaultfd.c:581:9: note: initialize the variable 'ret' to silence this warning
581 | int ret;
| ^
| = 0
1 warning generated.
vim +/ret +589 mm/userfaultfd.c
568
569 /* Handles UFFDIO_CONTINUE for all shmem VMAs (shared or private). */
570 static int mfill_atomic_pte_continue(struct mfill_state *state)
571 {
572 struct vm_area_struct *dst_vma = state->vma;
573 const struct vm_uffd_ops *ops = vma_uffd_ops(dst_vma);
574 unsigned long dst_addr = state->dst_addr;
575 pgoff_t pgoff = linear_page_index(dst_vma, dst_addr);
576 struct inode *inode = file_inode(dst_vma->vm_file);
577 uffd_flags_t flags = state->flags;
578 pmd_t *dst_pmd = state->pmd;
579 struct folio *folio;
580 struct page *page;
581 int ret;
582
583 if (!ops)
584 return -EOPNOTSUPP;
585
586 folio = ops->get_folio_noalloc(inode, pgoff);
587 /* Our caller expects us to return -EFAULT if we failed to find folio */
588 if (IS_ERR_OR_NULL(folio)) {
> 589 if (ret == -ENOENT || !folio)
590 ret = -EFAULT;
591 return -EFAULT;
592 }
593
594 page = folio_file_page(folio, pgoff);
595 if (PageHWPoison(page)) {
596 ret = -EIO;
597 goto out_release;
598 }
599
600 ret = mfill_atomic_install_pte(dst_pmd, dst_vma, dst_addr,
601 page, false, flags);
602 if (ret)
603 goto out_release;
604
605 folio_unlock(folio);
606 return 0;
607
608 out_release:
609 folio_unlock(folio);
610 folio_put(folio);
611 return ret;
612 }
613
--
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:[~2026-01-19 0:49 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-01-19 0:49 [rppt:uffd/refactor/v0.2 8/11] mm/userfaultfd.c:589:7: warning: variable 'ret' is uninitialized when used here 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