From: Dan Carpenter <dan.carpenter@oracle.com>
To: kbuild@lists.01.org, Stefano Garzarella <sgarzare@redhat.com>,
"Michael S. Tsirkin" <mst@redhat.com>
Cc: lkp@intel.com, kbuild-all@lists.01.org,
linux-kernel@vger.kernel.org,
Mike Christie <michael.christie@oracle.com>,
Stefano Garzarella <sgarzare@redhat.com>,
Jason Wang <jasowang@redhat.com>,
netdev@vger.kernel.org, Asias He <asias@redhat.com>,
virtualization@lists.linux-foundation.org,
Stefan Hajnoczi <stefanha@redhat.com>,
kvm@vger.kernel.org
Subject: Re: [PATCH] vhost/vsock: don't check owner in vhost_vsock_stop() while releasing
Date: Tue, 22 Feb 2022 08:30:17 +0300 [thread overview]
Message-ID: <202202220707.AM3rKUcP-lkp@intel.com> (raw)
In-Reply-To: <20220221114916.107045-1-sgarzare@redhat.com>
Hi Stefano,
url: https://github.com/0day-ci/linux/commits/Stefano-Garzarella/vhost-vsock-don-t-check-owner-in-vhost_vsock_stop-while-releasing/20220221-195038
base: https://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost.git linux-next
config: x86_64-randconfig-m031-20220221 (https://download.01.org/0day-ci/archive/20220222/202202220707.AM3rKUcP-lkp@intel.com/config)
compiler: gcc-9 (Debian 9.3.0-22) 9.3.0
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
smatch warnings:
drivers/vhost/vsock.c:655 vhost_vsock_stop() error: uninitialized symbol 'ret'.
vim +/ret +655 drivers/vhost/vsock.c
3ace84c91bfcde Stefano Garzarella 2022-02-21 632 static int vhost_vsock_stop(struct vhost_vsock *vsock, bool check_owner)
433fc58e6bf2c8 Asias He 2016-07-28 633 {
433fc58e6bf2c8 Asias He 2016-07-28 634 size_t i;
433fc58e6bf2c8 Asias He 2016-07-28 635 int ret;
433fc58e6bf2c8 Asias He 2016-07-28 636
433fc58e6bf2c8 Asias He 2016-07-28 637 mutex_lock(&vsock->dev.mutex);
433fc58e6bf2c8 Asias He 2016-07-28 638
3ace84c91bfcde Stefano Garzarella 2022-02-21 639 if (check_owner) {
433fc58e6bf2c8 Asias He 2016-07-28 640 ret = vhost_dev_check_owner(&vsock->dev);
433fc58e6bf2c8 Asias He 2016-07-28 641 if (ret)
433fc58e6bf2c8 Asias He 2016-07-28 642 goto err;
3ace84c91bfcde Stefano Garzarella 2022-02-21 643 }
"ret" not initialized on else path.
433fc58e6bf2c8 Asias He 2016-07-28 644
433fc58e6bf2c8 Asias He 2016-07-28 645 for (i = 0; i < ARRAY_SIZE(vsock->vqs); i++) {
433fc58e6bf2c8 Asias He 2016-07-28 646 struct vhost_virtqueue *vq = &vsock->vqs[i];
433fc58e6bf2c8 Asias He 2016-07-28 647
433fc58e6bf2c8 Asias He 2016-07-28 648 mutex_lock(&vq->mutex);
247643f85782fc Eugenio Pérez 2020-03-31 649 vhost_vq_set_backend(vq, NULL);
433fc58e6bf2c8 Asias He 2016-07-28 650 mutex_unlock(&vq->mutex);
433fc58e6bf2c8 Asias He 2016-07-28 651 }
433fc58e6bf2c8 Asias He 2016-07-28 652
433fc58e6bf2c8 Asias He 2016-07-28 653 err:
433fc58e6bf2c8 Asias He 2016-07-28 654 mutex_unlock(&vsock->dev.mutex);
433fc58e6bf2c8 Asias He 2016-07-28 @655 return ret;
433fc58e6bf2c8 Asias He 2016-07-28 656 }
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
next prev parent reply other threads:[~2022-02-22 5:31 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-02-21 11:49 [PATCH] vhost/vsock: don't check owner in vhost_vsock_stop() while releasing Stefano Garzarella
2022-02-21 13:59 ` Stefano Garzarella
2022-02-21 16:14 ` Anirudh Rayabharam
2022-02-21 16:44 ` Stefano Garzarella
2022-02-21 18:03 ` Anirudh Rayabharam
2022-02-21 18:26 ` Stefano Garzarella
2022-02-21 19:36 ` Anirudh Rayabharam
2022-02-22 9:05 ` Stefano Garzarella
2022-02-21 15:03 ` Michael S. Tsirkin
2022-02-21 15:22 ` Stefano Garzarella
2022-02-22 5:30 ` Dan Carpenter [this message]
2022-02-22 8:11 ` Stefano Garzarella
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=202202220707.AM3rKUcP-lkp@intel.com \
--to=dan.carpenter@oracle.com \
--cc=asias@redhat.com \
--cc=jasowang@redhat.com \
--cc=kbuild-all@lists.01.org \
--cc=kbuild@lists.01.org \
--cc=kvm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=lkp@intel.com \
--cc=michael.christie@oracle.com \
--cc=mst@redhat.com \
--cc=netdev@vger.kernel.org \
--cc=sgarzare@redhat.com \
--cc=stefanha@redhat.com \
--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