From: Luiz Capitulino <lcapitulino@redhat.com>
To: Ryan Harper <ryanh@us.ibm.com>
Cc: Kevin Wolf <kwolf@redhat.com>,
qemu-devel@nongnu.org, Markus Armbruster <armbru@redhat.com>
Subject: [Qemu-devel] Re: [PATCH] blockdev: check dinfo ptr before using
Date: Wed, 8 Dec 2010 16:36:06 -0200 [thread overview]
Message-ID: <20101208163606.79831504@doriath> (raw)
In-Reply-To: <20101208160500.GQ22381@us.ibm.com>
On Wed, 8 Dec 2010 10:05:00 -0600
Ryan Harper <ryanh@us.ibm.com> wrote:
> If a user decides to punish a guest by revoking its block device via
> drive_del, and subsequently also attempts to remove the pci device
> backing it, and the device is using blockdev_auto_del() then we get a
> segfault when we attempt to access dinfo->auto_del.[1]
>
> The fix is to check if drive_get_by_blockdev() actually returns a valid
> dinfo pointer or not.
>
> 1. (qemu) pci_add auto storage file=images/test01.raw,if=virtio,id=block1,snapshot=on
> (qemu) drive_del block1
> (qemu) pci_del 5
> *segfault*
>
> Signed-off-by: Ryan Harper <ryanh@us.ibm.com>
Fixes my test case:
Tested-by: Luiz Capitulino <lcapitulino@redhat.com>
next prev parent reply other threads:[~2010-12-08 18:36 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-12-08 16:05 [Qemu-devel] [PATCH] blockdev: check dinfo ptr before using Ryan Harper
2010-12-08 18:36 ` Luiz Capitulino [this message]
2010-12-10 15:05 ` [Qemu-devel] " Kevin Wolf
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=20101208163606.79831504@doriath \
--to=lcapitulino@redhat.com \
--cc=armbru@redhat.com \
--cc=kwolf@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=ryanh@us.ibm.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.