[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH] Fix crash with illegal "-net nic, model=xxx" op
From: |
Markus Armbruster |
Subject: |
Re: [Qemu-devel] [PATCH] Fix crash with illegal "-net nic, model=xxx" option |
Date: |
Mon, 27 Apr 2015 13:48:27 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux) |
Paolo Bonzini <address@hidden> writes:
> 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.
Thomas, can you clean this up now 2.3 is out?
Re: [Qemu-devel] [PATCH] Fix crash with illegal "-net nic, model=xxx" option, Michael S. Tsirkin, 2015/04/12
Re: [Qemu-devel] [PATCH] Fix crash with illegal "-net nic, model=xxx" option, Jason Wang, 2015/04/12