From: "Richard W.M. Jones" <rjones@redhat.com>
To: Paolo Bonzini <pbonzini@redhat.com>
Cc: qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [Bug 1378554] [NEW] qemu segfault in virtio_scsi_handle_cmd_req_submit on ARM 32 bit
Date: Wed, 8 Oct 2014 10:17:32 +0100 [thread overview]
Message-ID: <20141008091731.GC1349@redhat.com> (raw)
In-Reply-To: <543474AC.2050502@redhat.com>
On Wed, Oct 08, 2014 at 01:18:04AM +0200, Paolo Bonzini wrote:
> Does this work:
>
> diff --git a/hw/scsi/virtio-scsi.c b/hw/scsi/virtio-scsi.c
> index 203e624..c6d4f2e 100644
> --- a/hw/scsi/virtio-scsi.c
> +++ b/hw/scsi/virtio-scsi.c
> @@ -545,11 +545,12 @@ bool virtio_scsi_handle_cmd_req_prepare(VirtIOSCSI *s, VirtIOSCSIReq *req)
>
> void virtio_scsi_handle_cmd_req_submit(VirtIOSCSI *s, VirtIOSCSIReq *req)
> {
> - if (scsi_req_enqueue(req->sreq)) {
> - scsi_req_continue(req->sreq);
> + SCSIRequest *sreq = req->sreq;
> + bdrv_io_unplug(sreq->dev->conf.bs);
> + if (scsi_req_enqueue(sreq)) {
> + scsi_req_continue(sreq);
> }
> - bdrv_io_unplug(req->sreq->dev->conf.bs);
> - scsi_req_unref(req->sreq);
> + scsi_req_unref(sreq);
> }
>
> static void virtio_scsi_handle_cmd(VirtIODevice *vdev, VirtQueue *vq)
>
> ?
Yes, that fixes it.
Tested-by: Richard W.M. Jones <rjones@redhat.com>
Rich.
--
Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones
Read my programming and virtualization blog: http://rwmj.wordpress.com
Fedora Windows cross-compiler. Compile Windows programs, test, and
build Windows installers. Over 100 libraries supported.
http://fedoraproject.org/wiki/MinGW
next prev parent reply other threads:[~2014-10-08 9:17 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-10-07 22:36 [Qemu-devel] [Bug 1378554] [NEW] qemu segfault in virtio_scsi_handle_cmd_req_submit on ARM 32 bit Richard Jones
2014-10-07 22:38 ` [Qemu-devel] [Bug 1378554] " Richard Jones
2014-10-07 23:18 ` [Qemu-devel] [Bug 1378554] [NEW] " Paolo Bonzini
2014-10-08 9:17 ` Richard W.M. Jones [this message]
2017-11-23 18:36 ` [Qemu-devel] [Bug 1378554] " Peter Maydell
2017-11-23 19:11 ` Peter Maydell
2017-11-23 19:20 ` Richard 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=20141008091731.GC1349@redhat.com \
--to=rjones@redhat.com \
--cc=pbonzini@redhat.com \
--cc=qemu-devel@nongnu.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).