From: "Michael S. Tsirkin" <mst@redhat.com>
To: Christoph Hellwig <hch@lst.de>
Cc: Mike Galbraith <efault@gmx.de>,
Thorsten Leemhuis <linux@leemhuis.info>,
virtio-dev@lists.oasis-open.org,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
rjones@redhat.com
Subject: Re: Random guest crashes since 5c34d002dcc7 ("virtio_pci: use shared interrupts for virtqueues")
Date: Mon, 27 Mar 2017 21:16:12 +0300 [thread overview]
Message-ID: <20170327211246-mutt-send-email-mst@kernel.org> (raw)
In-Reply-To: <20170327170540.GA28715@lst.de>
On Mon, Mar 27, 2017 at 07:05:40PM +0200, Christoph Hellwig wrote:
> Hi Mike,
>
> does the patch below fix that issue for you?
>
> diff --git a/drivers/virtio/virtio_pci_common.c b/drivers/virtio/virtio_pci_common.c
> index df548a6fb844..fd1b06368b1f 100644
> --- a/drivers/virtio/virtio_pci_common.c
> +++ b/drivers/virtio/virtio_pci_common.c
> @@ -176,7 +176,7 @@ static int vp_find_vqs_msix(struct virtio_device *vdev, unsigned nvqs,
> if (err < 0)
> return err;
>
> - vp_dev->msix_vectors = nvectors;
> + vp_dev->msix_vectors = err; /* number of vectors allocated */
> vp_dev->msix_names = kmalloc_array(nvectors,
> sizeof(*vp_dev->msix_names), GFP_KERNEL);
> if (!vp_dev->msix_names)
Can this sometimes allocate less vectors than min number requested then?
I didn't realize.
In that case we probably should change if (err < 0)
to if (err != nvectors) and similarly for when we try
to get 2 vectors.
Mike, could you pls send lspci -vv that shows up after
boot?
--
MST
next prev parent reply other threads:[~2017-03-27 18:16 UTC|newest]
Thread overview: 69+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-03-23 14:51 Random guest crashes since 5c34d002dcc7 ("virtio_pci: use shared interrupts for virtqueues") Thorsten Leemhuis
2017-03-23 14:56 ` Christoph Hellwig
2017-03-23 14:59 ` Richard W.M. Jones
2017-03-23 15:01 ` Thorsten Leemhuis
2017-03-23 15:19 ` Richard W.M. Jones
2017-03-27 9:07 ` Mike Galbraith
2017-03-27 17:05 ` Christoph Hellwig
2017-03-27 18:16 ` Michael S. Tsirkin [this message]
2017-03-28 1:08 ` Mike Galbraith
2017-03-28 2:35 ` Michael S. Tsirkin
2017-03-28 3:16 ` Mike Galbraith
2017-03-28 15:37 ` Michael S. Tsirkin
2017-03-28 16:33 ` Mike Galbraith
2017-03-28 17:27 ` Michael S. Tsirkin
2017-03-28 17:47 ` Mike Galbraith
2017-03-27 18:18 ` Mike Galbraith
2017-03-29 6:23 ` Mike Galbraith
2017-03-29 20:10 ` Michael S. Tsirkin
2017-03-30 3:10 ` Mike Galbraith
2017-03-30 7:20 ` Mike Galbraith
[not found] ` <20170331041959-mutt-send-email-mst@kernel.org>
2017-03-31 3:22 ` Michael S. Tsirkin
2017-03-31 8:20 ` Christoph Hellwig
2017-03-31 16:47 ` Michael S. Tsirkin
2017-04-03 14:18 ` Christoph Hellwig
2017-04-03 15:49 ` Michael S. Tsirkin
2017-04-03 16:14 ` Michael S. Tsirkin
2017-04-05 6:36 ` Christoph Hellwig
2017-04-03 17:56 ` Mike Galbraith
2017-04-03 18:11 ` Michael S. Tsirkin
2017-04-04 4:02 ` Mike Galbraith
2017-04-04 13:38 ` Michael S. Tsirkin
2017-04-04 14:18 ` Mike Galbraith
2017-04-04 14:24 ` Michael S. Tsirkin
2017-04-04 15:30 ` Michael S. Tsirkin
2017-04-04 17:40 ` Mike Galbraith
2017-04-04 17:54 ` Mike Galbraith
2017-04-04 18:00 ` Michael S. Tsirkin
2017-04-04 18:38 ` Mike Galbraith
2017-04-04 21:31 ` Michael S. Tsirkin
2017-04-05 2:54 ` Mike Galbraith
2017-04-04 19:03 ` Michael S. Tsirkin
2017-04-05 3:09 ` Mike Galbraith
2017-04-05 3:13 ` Michael S. Tsirkin
2017-04-05 3:24 ` Mike Galbraith
2017-04-05 3:40 ` Mike Galbraith
2017-04-05 3:51 ` Michael S. Tsirkin
2017-04-05 4:24 ` Mike Galbraith
2017-04-05 6:29 ` Christoph Hellwig
2017-04-05 6:51 ` Mike Galbraith
2017-04-05 21:38 ` Michael S. Tsirkin
2017-04-07 6:03 ` Mike Galbraith
2017-04-07 6:24 ` Michael S. Tsirkin
2017-04-07 6:44 ` Mike Galbraith
2017-04-07 7:05 ` Mike Galbraith
2017-04-07 7:22 ` Mike Galbraith
2017-04-07 7:23 ` Mike Galbraith
2017-04-07 13:20 ` Michael S. Tsirkin
2017-04-07 13:35 ` Michael S. Tsirkin
2017-04-07 14:29 ` Mike Galbraith
2017-04-07 18:56 ` Michael S. Tsirkin
2017-04-08 5:01 ` Mike Galbraith
2017-04-10 21:23 ` Michael S. Tsirkin
2017-04-11 4:19 ` Mike Galbraith
2017-04-05 3:52 ` Michael S. Tsirkin
2017-04-07 21:35 ` [Random guest crashes since 5c34d002dcc7 ("virtio_pci] 3313bedd74: WARNING:at_include/linux/pci.h:#vp_del_vqs kernel test robot
2017-03-29 20:19 ` Random guest crashes since 5c34d002dcc7 ("virtio_pci: use shared interrupts for virtqueues") Michael S. Tsirkin
2017-03-30 3:54 ` Mike Galbraith
2017-03-28 1:01 ` Mike Galbraith
2017-03-23 14:59 ` Richard W.M. Jones
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=20170327211246-mutt-send-email-mst@kernel.org \
--to=mst@redhat.com \
--cc=efault@gmx.de \
--cc=hch@lst.de \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@leemhuis.info \
--cc=rjones@redhat.com \
--cc=virtio-dev@lists.oasis-open.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).