[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date: Wed, 9 Sep 2020 20:23:54 +0300
From: Dan Carpenter <dan.carpenter@...cle.com>
To: kbuild@...ts.01.org, Zhu Lingshan <lingshan.zhu@...el.com>,
jasowang@...hat.com, mst@...hat.com
Cc: lkp@...el.com, kbuild-all@...ts.01.org,
virtualization@...ts.linux-foundation.org, netdev@...r.kernel.org,
kvm@...r.kernel.org, Zhu Lingshan <lingshan.zhu@...el.com>
Subject: Re: [PATCH] vhost: new vhost_vdpa SET/GET_BACKEND_FEATURES handlers
Hi Zhu,
url: https://github.com/0day-ci/linux/commits/Zhu-Lingshan/vhost-new-vhost_vdpa-SET-GET_BACKEND_FEATURES-handlers/20200909-115726
base: https://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost.git linux-next
config: parisc-randconfig-m031-20200909 (attached as .config)
compiler: hppa-linux-gcc (GCC) 9.3.0
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@...el.com>
Reported-by: Dan Carpenter <dan.carpenter@...cle.com>
New smatch warnings:
drivers/vhost/vdpa.c:356 vhost_vdpa_get_backend_features() warn: maybe return -EFAULT instead of the bytes remaining?
# https://github.com/0day-ci/linux/commit/f2da8fc35b4ef003de7d559a8c7730fedf9926f8
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Zhu-Lingshan/vhost-new-vhost_vdpa-SET-GET_BACKEND_FEATURES-handlers/20200909-115726
git checkout f2da8fc35b4ef003de7d559a8c7730fedf9926f8
vim +356 drivers/vhost/vdpa.c
f2da8fc35b4ef0 Zhu Lingshan 2020-09-09 348 static long vhost_vdpa_get_backend_features(void __user *argp)
f2da8fc35b4ef0 Zhu Lingshan 2020-09-09 349 {
f2da8fc35b4ef0 Zhu Lingshan 2020-09-09 350 u64 features = VHOST_VDPA_BACKEND_FEATURES;
f2da8fc35b4ef0 Zhu Lingshan 2020-09-09 351 u64 __user *featurep = argp;
f2da8fc35b4ef0 Zhu Lingshan 2020-09-09 352 long r;
f2da8fc35b4ef0 Zhu Lingshan 2020-09-09 353
f2da8fc35b4ef0 Zhu Lingshan 2020-09-09 354 r = copy_to_user(featurep, &features, sizeof(features));
f2da8fc35b4ef0 Zhu Lingshan 2020-09-09 355
f2da8fc35b4ef0 Zhu Lingshan 2020-09-09 @356 return r;
copy_to_user() returns the number of bytes remaining. I haven't looked
at how this is called but it should probably return negative error codes
on error:
if (copy_to_user(featurep, &features, sizeof(features)))
return -EFAULT;
return 0;
f2da8fc35b4ef0 Zhu Lingshan 2020-09-09 357 }
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
Download attachment ".config.gz" of type "application/gzip" (30628 bytes)
Powered by blists - more mailing lists