Content-Type: multipart/mixed; boundary="===============1344657020007415781==" MIME-Version: 1.0 From: kernel test robot To: kbuild-all@lists.01.org Subject: Re: [PATCH 6/8] vhost_task: Allow vhost layer to use copy_process Date: Thu, 03 Feb 2022 22:06:49 +0800 Message-ID: <202202032136.uq6pXzYT-lkp@intel.com> In-Reply-To: <20220202210200.5235-7-michael.christie@oracle.com> List-Id: --===============1344657020007415781== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Hi Mike, Thank you for the patch! Perhaps something to improve: [auto build test WARNING on mst-vhost/linux-next] [also build test WARNING on tip/x86/core linus/master v5.17-rc2] [cannot apply to davem-sparc/master] [If your patch is applied to the wrong git tree, kindly drop us a note. And when submitting patch, we suggest to use '--base' as documented in https://git-scm.com/docs/git-format-patch] url: https://github.com/0day-ci/linux/commits/Mike-Christie/Use-copy_pro= cess-in-vhost-layer/20220203-050454 base: https://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost.git linux= -next config: x86_64-randconfig-s021 (https://download.01.org/0day-ci/archive/202= 20203/202202032136.uq6pXzYT-lkp(a)intel.com/config) compiler: gcc-9 (Debian 9.3.0-22) 9.3.0 reproduce: # apt-get install sparse # sparse version: v0.6.4-dirty # https://github.com/0day-ci/linux/commit/2c7380ae8136c224f4c707402= 7303b97b0a0f84c git remote add linux-review https://github.com/0day-ci/linux git fetch --no-tags linux-review Mike-Christie/Use-copy_process-in-= vhost-layer/20220203-050454 git checkout 2c7380ae8136c224f4c7074027303b97b0a0f84c # save the config file to linux build tree mkdir build_dir make W=3D1 C=3D1 CF=3D'-fdiagnostic-prefix -D__CHECK_ENDIAN__' O=3D= build_dir ARCH=3Dx86_64 SHELL=3D/bin/bash If you fix the issue, kindly add following tag as appropriate Reported-by: kernel test robot sparse warnings: (new ones prefixed by >>) >> kernel/vhost_task.c:85:24: sparse: sparse: incorrect type in argument 1 = (different base types) @@ expected unsigned long [usertype] size @@ = got restricted gfp_t @@ kernel/vhost_task.c:85:24: sparse: expected unsigned long [usertype]= size kernel/vhost_task.c:85:24: sparse: got restricted gfp_t >> kernel/vhost_task.c:85:36: sparse: sparse: incorrect type in argument 2 = (different base types) @@ expected restricted gfp_t [usertype] flags @@= got unsigned long @@ kernel/vhost_task.c:85:36: sparse: expected restricted gfp_t [userty= pe] flags kernel/vhost_task.c:85:36: sparse: got unsigned long vim +85 kernel/vhost_task.c 62 = 63 /** 64 * vhost_task_create - create a copy of a process to be used by the = kernel 65 * @fn: thread stack 66 * @arg: data to be passed to fn 67 * @node: numa node to allocate task from 68 * 69 * This returns a specialized task for use by the vhost layer or NUL= L on 70 * failure. The returned task is inactive, and the caller must fire = it up 71 * through vhost_task_start(). 72 */ 73 struct vhost_task *vhost_task_create(int (*fn)(void *), void *arg, i= nt node) 74 { 75 struct kernel_clone_args args =3D { 76 .flags =3D CLONE_FS | CLONE_UNTRACED | CLONE_VM, 77 .exit_signal =3D 0, 78 .stack =3D (unsigned long)vhost_task_fn, 79 .worker_flags =3D USER_WORKER | USER_WORKER_NO_FILES | 80 USER_WORKER_SIG_IGN, 81 }; 82 struct vhost_task *vtsk; 83 struct task_struct *tsk; 84 = > 85 vtsk =3D kzalloc(GFP_KERNEL, sizeof(*vtsk)); 86 if (!vtsk) 87 return ERR_PTR(-ENOMEM); 88 = 89 init_completion(&vtsk->exited); 90 vtsk->data =3D arg; 91 vtsk->fn =3D fn; 92 args.stack_size =3D (unsigned long)vtsk; 93 = 94 tsk =3D copy_process(NULL, 0, node, &args); 95 if (IS_ERR(tsk)) { 96 kfree(vtsk); 97 return NULL; 98 } 99 = 100 vtsk->task =3D tsk; 101 = 102 return vtsk; 103 } 104 EXPORT_SYMBOL_GPL(vhost_task_create); 105 = --- 0-DAY CI Kernel Test Service, Intel Corporation https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org --===============1344657020007415781==--