tree:
https://git.kernel.org/pub/scm/linux/kernel/git/arnd/playground.git
arm-kill-set_fs-5
head: 1086c1cb895540fdf215aecf3ed4a96843d6633e
commit: 7c6abb06b21a8c97bae4a330de4a490c5acf0dbf [17/40] scsi: megaraid_sas: simplify
compat_ioctl handling
config: arc-allyesconfig (attached as .config)
compiler: arceb-elf-gcc (GCC) 9.3.0
reproduce (this is a W=1 build):
wget
https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O
~/bin/make.cross
chmod +x ~/bin/make.cross
git checkout 7c6abb06b21a8c97bae4a330de4a490c5acf0dbf
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=arc
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All warnings (new ones prefixed by >>):
drivers/scsi/megaraid/megaraid_sas_base.c: In function
'megasas_compat_iocpacket_get_user':
> drivers/scsi/megaraid/megaraid_sas_base.c:8347:10: warning:
returning 'int' from a function with return type 'struct megasas_iocpacket
*' makes pointer from integer without a cast [-Wint-conversion]
8347 |
return -ENOMEM;
| ^
#
https://git.kernel.org/pub/scm/linux/kernel/git/arnd/playground.git/commi...
git remote add arnd-playground
https://git.kernel.org/pub/scm/linux/kernel/git/arnd/playground.git
git fetch --no-tags arnd-playground arm-kill-set_fs-5
git checkout 7c6abb06b21a8c97bae4a330de4a490c5acf0dbf
vim +8347 drivers/scsi/megaraid/megaraid_sas_base.c
8335
8336 static struct megasas_iocpacket *
8337 megasas_compat_iocpacket_get_user(void __user *arg)
8338 {
8339 struct megasas_iocpacket *ioc;
8340 struct compat_megasas_iocpacket __user *cioc = arg;
8341 size_t size;
8342 int err = -EFAULT;
8343 int i;
8344
8345 ioc = kzalloc(sizeof(*ioc), GFP_KERNEL);
8346 if (!ioc)
8347 return -ENOMEM;
8348 size = offsetof(struct
megasas_iocpacket, frame) + sizeof(ioc->frame);
8349 if (copy_from_user(ioc, arg, size))
8350 goto out;
8351
8352 for (i = 0; i < MAX_IOCTL_SGE; i++) {
8353 compat_uptr_t iov_base;
8354 if (get_user(iov_base, &cioc->sgl[i].iov_base) ||
8355 get_user(ioc->sgl[i].iov_len, &cioc->sgl[i].iov_len)) {
8356 goto out;
8357 }
8358 ioc->sgl[i].iov_base = compat_ptr(iov_base);
8359 }
8360
8361 return ioc;
8362 out:
8363 kfree(ioc);
8364
8365 return ERR_PTR(err);
8366 }
8367
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org