qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH for-1.7] qdev-properties-system.c: Allow vlan or


From: Vlad Yasevich
Subject: Re: [Qemu-devel] [PATCH for-1.7] qdev-properties-system.c: Allow vlan or netdev for -device, not both
Date: Thu, 21 Nov 2013 14:47:57 -0500
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.1.0

On 11/11/2013 02:50 AM, Paolo Bonzini wrote:
> Il 11/11/2013 06:18, Jason Wang ha scritto:
>> On 11/08/2013 10:13 AM, Vlad Yasevich wrote:
>>> It is currently possible to specify things like:
>>>     -device e1000,netdev=foo,vlan=1
>>> With this usage, whichever argument was specified last (vlan or netdev)
>>> overwrites what was previousely set and results in a non-working
>>> configuration.  Even worse, when used with multiqueue devices,
>>> it causes a segmentation fault on exit in qemu_free_net_client.
>>>
>>> That patch treates the above command line options as invalid and
>>> generates an error at start-up.
>>>
>>> Signed-off-by: Vlad Yasevich <address@hidden>
>>> ---
>>>  hw/core/qdev-properties-system.c | 9 +++++++++
>>>  1 file changed, 9 insertions(+)
>>>
>>> diff --git a/hw/core/qdev-properties-system.c 
>>> b/hw/core/qdev-properties-system.c
>>> index 0eada32..729efa8 100644
>>> --- a/hw/core/qdev-properties-system.c
>>> +++ b/hw/core/qdev-properties-system.c
>>> @@ -205,6 +205,11 @@ static int parse_netdev(DeviceState *dev, const char 
>>> *str, void **ptr)
>>>              goto err;
>>>          }
>>>  
>>> +        if (ncs[i]) {
>>> +            ret = -EINVAL;
>>> +            goto err;
>>> +        }
>>> +
>>>          ncs[i] = peers[i];
>>>          ncs[i]->queue_index = i;
>>>      }
>>> @@ -301,6 +306,10 @@ static void set_vlan(Object *obj, Visitor *v, void 
>>> *opaque,
>>>          *ptr = NULL;
>>>          return;
>>>      }
>>> +    if (*ptr) {
>>> +        error_set_from_qdev_prop_error(errp, -EINVAL, dev, prop, name);
>>> +        return;
>>> +    }
>>>  
>>>      hubport = net_hub_port_find(id);
>>>      if (!hubport) {
>>
>> Acked-by: Jason Wang <address@hidden>
> 
> This patch is good for 1.7.
> 
> Paolo
> 

Hi All

Just wondering what's to become of this patch?  It has an ACK, but has
been abandoned.  It does a fix a crash in qemu.

Thanks
-vlad




reply via email to

[Prev in Thread] Current Thread [Next in Thread]