mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Vivek Goyal <vgoyal@redhat.com>
Cc: kbuild-all@lists.01.org, linux-kernel@vger.kernel.org,
	Miklos Szeredi <mszeredi@redhat.com>
Subject: fs/fuse/virtio_fs.c:604:9: warning: 'strncpy' specified bound 24 equals destination size
Date: Tue, 28 Sep 2021 03:31:48 +0800	[thread overview]
Message-ID: <202109280333.nETjg5gP-lkp@intel.com> (raw)

[-- 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 --]

                 reply	other threads:[~2021-09-27 19:32 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=202109280333.nETjg5gP-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=kbuild-all@lists.01.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mszeredi@redhat.com \
    --cc=vgoyal@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®