From: Paolo Bonzini <pbonzini@redhat.com>
To: Xiang Zheng <zhengxiang9@huawei.com>, qemu-devel@nongnu.org
Cc: fam@euphon.net, wanghaibin.wang@huawei.com, lizhengui@huawei.com
Subject: Re: [Qemu-devel] [PATCH] scsi-cd: Fix crash after remote cdrom detached
Date: Thu, 14 Feb 2019 19:07:46 +0100 [thread overview]
Message-ID: <ec12aeeb-a480-f07d-c75e-6d6acf0359fa@redhat.com> (raw)
In-Reply-To: <20190214122700.18572-1-zhengxiang9@huawei.com>
On 14/02/19 13:27, Xiang Zheng wrote:
> There is a small window between the twice blk_is_available in
> scsi_disk_emulate_command which would cause crash due to the later
> assertion if the remote cdrom is detached in this window.
>
> So this patch replaces assertions with return to avoid qemu crash.
>
> Signed-off-by: Xiang Zheng <zhengxiang9@huawei.com>
> ---
> The qemu error log shows:
>
> qemu-system-aarch64: /home/qemu/hw/scsi/scsi-disk.c:1896: scsi_disk_emulate_command: Assertion `blk_is_available(s->qdev.conf.blk)' failed.
> 2019-02-15 04:35:18.592: shutting down, reason=crashed
Is this with virtio-scsi-dataplane?
Paolo
next prev parent reply other threads:[~2019-02-14 18:07 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-02-14 12:27 [Qemu-devel] [PATCH] scsi-cd: Fix crash after remote cdrom detached Xiang Zheng
2019-02-14 18:07 ` Paolo Bonzini [this message]
2019-02-15 3:17 ` Zheng Xiang
2019-02-25 5:44 ` Zheng Xiang
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=ec12aeeb-a480-f07d-c75e-6d6acf0359fa@redhat.com \
--to=pbonzini@redhat.com \
--cc=fam@euphon.net \
--cc=lizhengui@huawei.com \
--cc=qemu-devel@nongnu.org \
--cc=wanghaibin.wang@huawei.com \
--cc=zhengxiang9@huawei.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;
as well as URLs for NNTP newsgroup(s).