All of lore.kernel.org
 help / color / mirror / Atom feed
From: Paolo Bonzini <pbonzini@redhat.com>
To: Eric Blake <eblake@redhat.com>, Thomas Huth <thuth@redhat.com>,
	qemu-devel@nongnu.org
Cc: jasowang@redhat.com, stefanha@redhat.com, mst@redhat.com
Subject: Re: [Qemu-devel] [PATCH] Fix crash with illegal "-net nic, model=xxx" option
Date: Thu, 09 Apr 2015 21:57:17 +0200	[thread overview]
Message-ID: <5526D99D.7010103@redhat.com> (raw)
In-Reply-To: <5526C58F.2050805@redhat.com>



On 09/04/2015 20:31, Eric Blake wrote:
>> diff --git a/hw/pci/pci.c b/hw/pci/pci.c
>> index 6941a82..b3d5100 100644
>> --- a/hw/pci/pci.c
>> +++ b/hw/pci/pci.c
>> @@ -1660,7 +1660,9 @@ PCIDevice *pci_nic_init_nofail(NICInfo *nd, PCIBus *rootbus,
>>  
>>      res = pci_nic_init(nd, rootbus, default_model, default_devaddr, &err);
>>      if (!res) {
>> -        error_report_err(err);
>> +        if (err) {
>> +            error_report_err(err);
>> +        }
>>          exit(1);
> 
> Doesn't this mean the program can exit without an error message, if
> pci_nic_init returns failure but failed to set err?  Shouldn't you at
> least print something in that case as an else branch?

git grep 'Unsupported NIC model' shows that the error is printed with
error_report; same for other errors produced by pci_nic_init.

This is not beautiful compared to correct propagation of Error*, but
it's okay because -net is only used at startup.  It's good enough for rc3.

Paolo

  reply	other threads:[~2015-04-09 19:57 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-04-09 13:32 [Qemu-devel] [PATCH] Fix crash with illegal "-net nic, model=xxx" option Thomas Huth
2015-04-09 13:37 ` Michael S. Tsirkin
2015-04-09 14:48   ` Peter Maydell
2015-04-12 11:14     ` Michael S. Tsirkin
2015-04-12 11:57       ` Andreas Färber
2015-04-09 18:31 ` Eric Blake
2015-04-09 19:57   ` Paolo Bonzini [this message]
2015-04-27 11:48     ` Markus Armbruster
2015-04-27 15:19       ` Thomas Huth
2015-04-12 11:13 ` Michael S. Tsirkin
2015-04-13  3:01 ` Jason Wang
2015-04-13 11:28   ` Peter Maydell

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=5526D99D.7010103@redhat.com \
    --to=pbonzini@redhat.com \
    --cc=eblake@redhat.com \
    --cc=jasowang@redhat.com \
    --cc=mst@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=stefanha@redhat.com \
    --cc=thuth@redhat.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.