[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH] net: avoid segfault in case netdev_del non-host
From: |
Stefan Hajnoczi |
Subject: |
Re: [Qemu-devel] [PATCH] net: avoid segfault in case netdev_del non-host network device |
Date: |
Fri, 2 Nov 2012 08:38:32 +0100 |
On Fri, Nov 2, 2012 at 3:10 AM, Lei Li <address@hidden> wrote:
> On 11/01/2012 05:42 PM, Stefan Hajnoczi wrote:
>>
>> On Thu, Nov 1, 2012 at 8:48 AM, Lei Li <address@hidden> wrote:
>>>
>>> netdev_del assume that remove host network device.
>>> However, when try to remove a non-host network device
>>> by netdev_del, it will cause a segfault.
>>
>> I recently sent a similar fix which forbids deleting non-netdev net
>> clients from netdev_del:
>> http://patchwork.ozlabs.org/patch/193759/
>
>
> Hi Stefan,
>
> Sorry I did not see it... Seems I miss this chance to submit a patch. :-P
>
> BTW, I was thinking that should we add another hacking to check
> if the deleting object is a netdev or a VLAN client?
netdev_del now only deletes -netdev or netdev_add net clients. It
refuses to delete -net clients because they are not in the "netdev"
QemuOptsList. It also refuses to delete net/hub.c ports that were
added by net_hub_add_port() because they are not in the "netdev"
QemuOptsList.
I'm not sure I understand what you are suggesting?
Stefan