All of lore.kernel.org
 help / color / mirror / Atom feed
* [openeuler:OLK-6.6 3482/3482] drivers/misc/zcopy/zcopy.c:621:51: sparse: sparse: incorrect type in argument 2 (different address spaces)
@ 2025-12-07 16:22 kernel test robot
  0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2025-12-07 16:22 UTC (permalink / raw)
  To: kernel, Liu Mingrui; +Cc: oe-kbuild-all

tree:   https://gitee.com/openeuler/kernel.git OLK-6.6
head:   4b48fa45408a2757255bdd0c640c1f693b424fe4
commit: 0305a09f222b7b94b01e478948f09ef95e9afda2 [3482/3482] zcopy: Introduce the pageattach interface
config: arm64-randconfig-r111-20251206 (https://download.01.org/0day-ci/archive/20251208/202512080059.AtMf7DsU-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/20251208/202512080059.AtMf7DsU-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/202512080059.AtMf7DsU-lkp@intel.com/

sparse warnings: (new ones prefixed by >>)
>> drivers/misc/zcopy/zcopy.c:621:51: sparse: sparse: incorrect type in argument 2 (different address spaces) @@     expected void const [noderef] __user *from @@     got void * @@
   drivers/misc/zcopy/zcopy.c:621:51: sparse:     expected void const [noderef] __user *from
   drivers/misc/zcopy/zcopy.c:621:51: sparse:     got void *

vim +621 drivers/misc/zcopy/zcopy.c

   611	
   612	static long zcopy_ioctl(struct file *file, unsigned int type, unsigned long ptr)
   613	{
   614		long ret = 0;
   615	
   616		switch (type) {
   617		case IO_ATTACH:
   618		{
   619			struct zcopy_ioctl_pswap ctx;
   620	
 > 621			if (copy_from_user((void *)&ctx, (void *)ptr,
   622									sizeof(struct zcopy_ioctl_pswap))) {
   623				ret = -EFAULT;
   624				break;
   625			}
   626			ret = attach_pages(ctx.dst_addr, ctx.src_addr, ctx.dst_pid,
   627						ctx.src_pid, ctx.size);
   628			break;
   629		}
   630		default:
   631			break;
   632		}
   633	
   634		return ret;
   635	}
   636	

-- 
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-12-07 16:23 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-12-07 16:22 [openeuler:OLK-6.6 3482/3482] drivers/misc/zcopy/zcopy.c:621:51: sparse: sparse: incorrect type in argument 2 (different address spaces) kernel test robot

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.