From: "Andreas Färber" <afaerber@suse.de>
To: armbru@redhat.com
Cc: pbonzini@redhat.com, qemu-stable@nongnu.org,
qemu-devel@nongnu.org, kraxel@redhat.com
Subject: Re: [Qemu-devel] [PATCH] scsi: Fix scsi_bus_legacy_add_drive() scsi-generic with serial
Date: Fri, 23 Aug 2013 18:08:48 +0200 [thread overview]
Message-ID: <52178910.4080500@suse.de> (raw)
In-Reply-To: <1377273718-26937-1-git-send-email-armbru@redhat.com>
Am 23.08.2013 18:01, schrieb armbru@redhat.com:
> From: Markus Armbruster <armbru@redhat.com>
>
> scsi_bus_legacy_add_drive() creates either a scsi-disk or a
> scsi-generic device. It sets property "serial" to argument serial
> unless null. Crashes with scsi-generic, because it doesn't have such
> the property.
>
> Only usb_msd_initfn_storage() passes non-null serial. Reproducer:
>
> $ qemu-system-x86_64 -nodefaults -display none -S -usb \
> -drive if=none,file=/dev/sg1,id=usb-drv0 \
> -device usb-storage,id=usb-msd0,drive=usb-drv0,serial=123
> qemu-system-x86_64: -device usb-storage,id=usb-msd0,drive=usb-drv0,serial=123: Property '.serial' not found
> Aborted (core dumped)
>
> Fix by handling exactly like "removable": set the property only when
> it exists.
>
> Cc: qemu-stable@nongnu.org
> Signed-off-by: Markus Armbruster <armbru@redhat.com>
> ---
> hw/scsi/scsi-bus.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
Reviewed-by: Andreas Färber <afaerber@suse.de>
Andreas
--
SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany
GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer; HRB 16746 AG Nürnberg
next prev parent reply other threads:[~2013-08-23 16:09 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-08-23 16:01 [Qemu-devel] [PATCH] scsi: Fix scsi_bus_legacy_add_drive() scsi-generic with serial armbru
2013-08-23 16:08 ` Andreas Färber [this message]
2013-08-26 7:48 ` Paolo Bonzini
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=52178910.4080500@suse.de \
--to=afaerber@suse.de \
--cc=armbru@redhat.com \
--cc=kraxel@redhat.com \
--cc=pbonzini@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=qemu-stable@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).