From: Marcel Apfelbaum <marcel.a@redhat.com>
To: mst@redhat.com
Cc: marcel@redhat.com, pbonzini@redhat.com,
alex.williamson@redhat.com, qemu-devel@nongnu.org,
Markus Armbruster <armbru@redhat.com>
Subject: Re: [Qemu-devel] [PATCH v4 1/2] hw/pci: fixed error flow in pci_qdev_init
Date: Thu, 30 Oct 2014 19:25:40 +0200 [thread overview]
Message-ID: <1414689940.2327.12.camel@localhost.localdomain> (raw)
In-Reply-To: <87bnoty960.fsf@blackfin.pond.sub.org>
On Thu, 2014-10-30 at 14:33 +0100, Markus Armbruster wrote:
> Marcel Apfelbaum <marcel.a@redhat.com> writes:
>
> > Verify return code for pci_add_option_rom.
> >
> > Signed-off-by: Marcel Apfelbaum <marcel.a@redhat.com>
> > ---
> > hw/pci/pci.c | 7 ++++++-
> > 1 file changed, 6 insertions(+), 1 deletion(-)
> >
> > diff --git a/hw/pci/pci.c b/hw/pci/pci.c
> > index 6ce75aa..36226eb 100644
> > --- a/hw/pci/pci.c
> > +++ b/hw/pci/pci.c
> > @@ -1776,7 +1776,12 @@ static int pci_qdev_init(DeviceState *qdev)
> > pci_dev->romfile = g_strdup(pc->romfile);
> > is_default_rom = true;
> > }
> > - pci_add_option_rom(pci_dev, is_default_rom);
> > +
> > + rc = pci_add_option_rom(pci_dev, is_default_rom);
> > + if (rc != 0) {
> > + pci_unregister_device(DEVICE(pci_dev));
> > + return rc;
> > + }
> >
> > return 0;
> > }
>
> Safe, because pci_add_option_rom() sets pci_dev->has_rom only on
> success, and pci_unregister_device() cleans up the ROM only when
> pci_has_rom is set.
>
> Reviewed-by: Markus Armbruster <armbru@redhat.com>
Hi Michael,
The series has been reviewed, can you please add it to
your next pull request?
Thanks,
Marcel
next prev parent reply other threads:[~2014-10-31 15:38 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-10-27 17:34 [Qemu-devel] [PATCH v4 0/2] hw/pci: fixed hotplug crash when using rombar=0 with devices having romfile Marcel Apfelbaum
2014-10-27 17:34 ` [Qemu-devel] [PATCH v4 1/2] hw/pci: fixed error flow in pci_qdev_init Marcel Apfelbaum
2014-10-30 13:33 ` Markus Armbruster
2014-10-30 17:25 ` Marcel Apfelbaum [this message]
2014-10-27 17:34 ` [Qemu-devel] [PATCH v4 2/2] hw/pci: fixed hotplug crash when using rombar=0 with devices having romfile Marcel Apfelbaum
2014-11-03 12:03 ` Markus Armbruster
2014-11-03 12:46 ` Michael S. Tsirkin
2014-11-03 12:52 ` Marcel Apfelbaum
2014-11-03 13:40 ` Markus Armbruster
2014-11-03 13:49 ` Marcel Apfelbaum
2014-11-03 15:54 ` Markus Armbruster
2014-11-03 16:07 ` Marcel Apfelbaum
2014-11-03 16:10 ` Michael S. Tsirkin
2014-11-24 15:22 ` [Qemu-devel] [PATCH v4 0/2] " Marcel Apfelbaum
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=1414689940.2327.12.camel@localhost.localdomain \
--to=marcel.a@redhat.com \
--cc=alex.williamson@redhat.com \
--cc=armbru@redhat.com \
--cc=marcel@redhat.com \
--cc=mst@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).