[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <202209251724.hLiMI4EP-lkp@intel.com>
Date: Sun, 25 Sep 2022 18:31:18 +0800
From: kernel test robot <lkp@...el.com>
To: liujing <liujing@...s.chinamobile.com>, vgoyal@...hat.com
Cc: llvm@...ts.linux.dev, kbuild-all@...ts.01.org, stefanha@...hat.com,
miklos@...redi.hu, linux-fsdevel@...r.kernel.org,
linux-kernel@...r.kernel.org,
liujing <liujing@...s.chinamobile.com>
Subject: Re: [PATCH] virtio_fs.c: add check kmalloc return
Hi liujing,
Thank you for the patch! Yet something to improve:
[auto build test ERROR on mszeredi-fuse/for-next]
[also build test ERROR on linus/master v6.0-rc6 next-20220923]
[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#_base_tree_information]
url: https://github.com/intel-lab-lkp/linux/commits/liujing/virtio_fs-c-add-check-kmalloc-return/20220924-221859
base: https://git.kernel.org/pub/scm/linux/kernel/git/mszeredi/fuse.git for-next
config: x86_64-randconfig-a014
compiler: clang version 14.0.6 (https://github.com/llvm/llvm-project f28c006a5895fc0e329fe15fead81e37457cb1d1)
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
# https://github.com/intel-lab-lkp/linux/commit/41a643d745bd8722546399d1272b91a808cbd5d5
git remote add linux-review https://github.com/intel-lab-lkp/linux
git fetch --no-tags linux-review liujing/virtio_fs-c-add-check-kmalloc-return/20220924-221859
git checkout 41a643d745bd8722546399d1272b91a808cbd5d5
# save the config file
mkdir build_dir && cp config build_dir/.config
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=x86_64 SHELL=/bin/bash fs/
If you fix the issue, kindly add following tag where applicable
| Reported-by: kernel test robot <lkp@...el.com>
All errors (new ones prefixed by >>):
>> fs/fuse/virtio_fs.c:994:3: error: void function 'virtio_fs_wake_forget_and_unlock' should not return a value [-Wreturn-type]
return -ENOMEM;
^ ~~~~~~~
1 error generated.
vim +/virtio_fs_wake_forget_and_unlock +994 fs/fuse/virtio_fs.c
972
973 static void virtio_fs_wake_forget_and_unlock(struct fuse_iqueue *fiq)
974 __releases(fiq->lock)
975 {
976 struct fuse_forget_link *link;
977 struct virtio_fs_forget *forget;
978 struct virtio_fs_forget_req *req;
979 struct virtio_fs *fs;
980 struct virtio_fs_vq *fsvq;
981 u64 unique;
982
983 link = fuse_dequeue_forget(fiq, 1, NULL);
984 unique = fuse_get_unique(fiq);
985
986 fs = fiq->priv;
987 fsvq = &fs->vqs[VQ_HIPRIO];
988 spin_unlock(&fiq->lock);
989
990 /* Allocate a buffer for the request */
991 forget = kmalloc(sizeof(*forget), GFP_NOFS | __GFP_NOFAIL);
992
993 if (forget == NULL)
> 994 return -ENOMEM;
995
996 req = &forget->req;
997
998 req->ih = (struct fuse_in_header){
999 .opcode = FUSE_FORGET,
1000 .nodeid = link->forget_one.nodeid,
1001 .unique = unique,
1002 .len = sizeof(*req),
1003 };
1004 req->arg = (struct fuse_forget_in){
1005 .nlookup = link->forget_one.nlookup,
1006 };
1007
1008 send_forget_request(fsvq, forget, false);
1009 kfree(link);
1010 }
1011
--
0-DAY CI Kernel Test Service
https://01.org/lkp
View attachment "config" of type "text/plain" (161693 bytes)
Powered by blists - more mailing lists