LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
* fs/fuse/virtio_fs.c:604:9: warning: 'strncpy' specified bound 24 equals destination size
@ 2021-09-27 19:31 kernel test robot
  0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2021-09-27 19:31 UTC (permalink / raw)
  To: Vivek Goyal; +Cc: kbuild-all, linux-kernel, Miklos Szeredi

[-- Attachment #1: Type: text/plain, Size: 2368 bytes --]

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   92477dd1faa650e50bd3bb35a6c0b8d09198cc35
commit: b43b7e81eb2b188fab1d8bc334b4b725f6d2ae10 virtiofs: provide a helper function for virtqueue initialization
date:   1 year, 1 month ago
config: arm-randconfig-r025-20210927 (attached as .config)
compiler: arm-linux-gnueabi-gcc (GCC) 11.2.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
        # https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=b43b7e81eb2b188fab1d8bc334b4b725f6d2ae10
        git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
        git fetch --no-tags linus master
        git checkout b43b7e81eb2b188fab1d8bc334b4b725f6d2ae10
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross ARCH=arm 

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>

All warnings (new ones prefixed by >>):

   fs/fuse/virtio_fs.c: In function 'virtio_fs_init_vq':
>> fs/fuse/virtio_fs.c:604:9: warning: 'strncpy' specified bound 24 equals destination size [-Wstringop-truncation]
     604 |         strncpy(fsvq->name, name, VQ_NAME_LEN);
         |         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~


vim +/strncpy +604 fs/fuse/virtio_fs.c

   600	
   601	static void virtio_fs_init_vq(struct virtio_fs_vq *fsvq, char *name,
   602				      int vq_type)
   603	{
 > 604		strncpy(fsvq->name, name, VQ_NAME_LEN);
   605		spin_lock_init(&fsvq->lock);
   606		INIT_LIST_HEAD(&fsvq->queued_reqs);
   607		INIT_LIST_HEAD(&fsvq->end_reqs);
   608		init_completion(&fsvq->in_flight_zero);
   609	
   610		if (vq_type == VQ_REQUEST) {
   611			INIT_WORK(&fsvq->done_work, virtio_fs_requests_done_work);
   612			INIT_DELAYED_WORK(&fsvq->dispatch_work,
   613					  virtio_fs_request_dispatch_work);
   614		} else {
   615			INIT_WORK(&fsvq->done_work, virtio_fs_hiprio_done_work);
   616			INIT_DELAYED_WORK(&fsvq->dispatch_work,
   617					  virtio_fs_hiprio_dispatch_work);
   618		}
   619	}
   620	

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org

[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 25774 bytes --]

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2021-09-27 19:32 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-09-27 19:31 fs/fuse/virtio_fs.c:604:9: warning: 'strncpy' specified bound 24 equals destination size kernel test robot

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).