linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
* [akpm-mm:mm-new 419/429] mm/memfd_luo.c:446:40: sparse: sparse: dereference of noderef expression
@ 2026-01-22  7:11 kernel test robot
  0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2026-01-22  7:11 UTC (permalink / raw)
  To: Andrew Morton
  Cc: oe-kbuild-all, David Hildenbrand, Linux Memory Management List,
	Lorenzo Stoakes

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm.git mm-new
head:   dc4fe40a11269aead253fa0beb098b00417b8694
commit: 591558d3350ffa9764039f27ac357be01387ace0 [419/429] mm-update-shmem__file_-functions-to-use-vma_flags_t-fix
config: x86_64-randconfig-r113-20260122 (https://download.01.org/0day-ci/archive/20260122/202601221552.0MhL50xv-lkp@intel.com/config)
compiler: gcc-14 (Debian 14.2.0-19) 14.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20260122/202601221552.0MhL50xv-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/202601221552.0MhL50xv-lkp@intel.com/

sparse warnings: (new ones prefixed by >>)
>> mm/memfd_luo.c:446:40: sparse: sparse: dereference of noderef expression
   mm/memfd_luo.c: note: in included file (through include/linux/memcontrol.h, include/linux/swap.h, include/linux/shmem_fs.h):
   include/linux/mm.h:1047:16: sparse: sparse: dereference of noderef expression

vim +446 mm/memfd_luo.c

   434	
   435	static int memfd_luo_retrieve(struct liveupdate_file_op_args *args)
   436	{
   437		struct memfd_luo_folio_ser *folios_ser;
   438		struct memfd_luo_ser *ser;
   439		struct file *file;
   440		int err;
   441	
   442		ser = phys_to_virt(args->serialized_data);
   443		if (!ser)
   444			return -EINVAL;
   445	
 > 446		file = shmem_file_setup("", 0, mk_vma_flags(VMA_NORESERVE_BIT));
   447	
   448		if (IS_ERR(file)) {
   449			pr_err("failed to setup file: %pe\n", file);
   450			return PTR_ERR(file);
   451		}
   452	
   453		vfs_setpos(file, ser->pos, MAX_LFS_FILESIZE);
   454		file->f_inode->i_size = ser->size;
   455	
   456		if (ser->nr_folios) {
   457			folios_ser = kho_restore_vmalloc(&ser->folios);
   458			if (!folios_ser) {
   459				err = -EINVAL;
   460				goto put_file;
   461			}
   462	
   463			err = memfd_luo_retrieve_folios(file, folios_ser, ser->nr_folios);
   464			vfree(folios_ser);
   465			if (err)
   466				goto put_file;
   467		}
   468	
   469		args->file = file;
   470		kho_restore_free(ser);
   471	
   472		return 0;
   473	
   474	put_file:
   475		fput(file);
   476	
   477		return err;
   478	}
   479	

-- 
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-22  7:11 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-01-22  7:11 [akpm-mm:mm-new 419/429] mm/memfd_luo.c:446:40: sparse: sparse: dereference of noderef expression 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