linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Dan Carpenter <dan.carpenter@oracle.com>
To: kbuild@lists.01.org, Zhu Lingshan <lingshan.zhu@intel.com>,
	mst@redhat.com, kvm@vger.kernel.org,
	virtualization@lists.linux-foundation.org,
	linux-kernel@vger.kernel.org, netdev@vger.kernel.org,
	jasowang@redhat.com
Cc: lkp@intel.com, kbuild-all@lists.01.org, lulu@redhat.com,
	dan.daly@intel.com, cunming.liang@intel.com,
	Zhu Lingshan <lingshan.zhu@intel.com>
Subject: Re: [PATCH] vdpa: bypass waking up vhost_woker for vdpa vq kick
Date: Tue, 2 Jun 2020 12:42:03 +0300	[thread overview]
Message-ID: <20200602094203.GU30374@kadam> (raw)
In-Reply-To: <1590471145-4436-1-git-send-email-lingshan.zhu@intel.com>

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

Hi Zhu,

url:    https://github.com/0day-ci/linux/commits/Zhu-Lingshan/vdpa-bypass-waking-up-vhost_woker-for-vdpa-vq-kick/20200526-133819
base:   https://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost.git linux-next
config: x86_64-randconfig-m001-20200529 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-13) 9.3.0

If you fix the issue, kindly add following tag as appropriate
Reported-by: kbuild test robot <lkp@intel.com>
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>

smatch warnings:
drivers/vhost/vdpa.c:348 vhost_vdpa_set_vring_kick() error: uninitialized symbol 'r'.

# https://github.com/0day-ci/linux/commit/a84ddbf1ef29f18aafb2bb8a93bcedd4a29a967d
git remote add linux-review https://github.com/0day-ci/linux
git remote update linux-review
git checkout a84ddbf1ef29f18aafb2bb8a93bcedd4a29a967d
vim +/r +348 drivers/vhost/vdpa.c

a84ddbf1ef29f1 Zhu Lingshan 2020-05-26  316  static long vhost_vdpa_set_vring_kick(struct vhost_virtqueue *vq,
a84ddbf1ef29f1 Zhu Lingshan 2020-05-26  317  				      void __user *argp)
a84ddbf1ef29f1 Zhu Lingshan 2020-05-26  318  {
a84ddbf1ef29f1 Zhu Lingshan 2020-05-26  319  	bool pollstart = false, pollstop = false;
a84ddbf1ef29f1 Zhu Lingshan 2020-05-26  320  	struct file *eventfp, *filep = NULL;
a84ddbf1ef29f1 Zhu Lingshan 2020-05-26  321  	struct vhost_vring_file f;
a84ddbf1ef29f1 Zhu Lingshan 2020-05-26  322  	long r;
a84ddbf1ef29f1 Zhu Lingshan 2020-05-26  323  
a84ddbf1ef29f1 Zhu Lingshan 2020-05-26  324  	if (copy_from_user(&f, argp, sizeof(f)))
a84ddbf1ef29f1 Zhu Lingshan 2020-05-26  325  		return -EFAULT;
a84ddbf1ef29f1 Zhu Lingshan 2020-05-26  326  
a84ddbf1ef29f1 Zhu Lingshan 2020-05-26  327  	eventfp = f.fd == -1 ? NULL : eventfd_fget(f.fd);
a84ddbf1ef29f1 Zhu Lingshan 2020-05-26  328  	if (IS_ERR(eventfp)) {
a84ddbf1ef29f1 Zhu Lingshan 2020-05-26  329  		r = PTR_ERR(eventfp);
a84ddbf1ef29f1 Zhu Lingshan 2020-05-26  330  		return r;
a84ddbf1ef29f1 Zhu Lingshan 2020-05-26  331  	}
a84ddbf1ef29f1 Zhu Lingshan 2020-05-26  332  
a84ddbf1ef29f1 Zhu Lingshan 2020-05-26  333  	if (eventfp != vq->kick) {
a84ddbf1ef29f1 Zhu Lingshan 2020-05-26  334  		pollstop = (filep = vq->kick) != NULL;
a84ddbf1ef29f1 Zhu Lingshan 2020-05-26  335  		pollstart = (vq->kick = eventfp) != NULL;
a84ddbf1ef29f1 Zhu Lingshan 2020-05-26  336  	} else
a84ddbf1ef29f1 Zhu Lingshan 2020-05-26  337  		filep = eventfp;
a84ddbf1ef29f1 Zhu Lingshan 2020-05-26  338  
a84ddbf1ef29f1 Zhu Lingshan 2020-05-26  339  	if (pollstop && vq->handle_kick)
a84ddbf1ef29f1 Zhu Lingshan 2020-05-26  340  		vhost_vdpa_poll_stop(vq);
a84ddbf1ef29f1 Zhu Lingshan 2020-05-26  341  
a84ddbf1ef29f1 Zhu Lingshan 2020-05-26  342  	if (filep)
a84ddbf1ef29f1 Zhu Lingshan 2020-05-26  343  		fput(filep);
a84ddbf1ef29f1 Zhu Lingshan 2020-05-26  344  
a84ddbf1ef29f1 Zhu Lingshan 2020-05-26  345  	if (pollstart && vq->handle_kick)
a84ddbf1ef29f1 Zhu Lingshan 2020-05-26  346  		r = vhost_vdpa_poll_start(vq);

"r" not initialized on else path.

a84ddbf1ef29f1 Zhu Lingshan 2020-05-26  347  
a84ddbf1ef29f1 Zhu Lingshan 2020-05-26 @348  	return r;
a84ddbf1ef29f1 Zhu Lingshan 2020-05-26  349  }

---
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: 37374 bytes --]

  parent reply	other threads:[~2020-06-02  9:42 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-05-26  5:32 [PATCH] vdpa: bypass waking up vhost_woker for vdpa vq kick Zhu Lingshan
2020-05-26 22:53 ` kbuild test robot
2020-05-27  9:16 ` [RFC PATCH] vdpa: vhost_vdpa_poll_stop() can be static kbuild test robot
2020-05-28 10:06 ` [PATCH] vdpa: bypass waking up vhost_woker for vdpa vq kick Jason Wang
2020-06-02  9:42 ` Dan Carpenter [this message]
2020-06-02 10:16   ` Jason Wang
2020-06-02 11:10     ` Jason Wang

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=20200602094203.GU30374@kadam \
    --to=dan.carpenter@oracle.com \
    --cc=cunming.liang@intel.com \
    --cc=dan.daly@intel.com \
    --cc=jasowang@redhat.com \
    --cc=kbuild-all@lists.01.org \
    --cc=kbuild@lists.01.org \
    --cc=kvm@vger.kernel.org \
    --cc=lingshan.zhu@intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lkp@intel.com \
    --cc=lulu@redhat.com \
    --cc=mst@redhat.com \
    --cc=netdev@vger.kernel.org \
    --cc=virtualization@lists.linux-foundation.org \
    /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;
as well as URLs for NNTP newsgroup(s).