From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:41536) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TU6jA-0002F5-72 for qemu-devel@nongnu.org; Thu, 01 Nov 2012 22:11:21 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TU6j8-0001P5-Vz for qemu-devel@nongnu.org; Thu, 01 Nov 2012 22:11:20 -0400 Received: from e28smtp06.in.ibm.com ([122.248.162.6]:45159) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TU6j8-0001Ob-AO for qemu-devel@nongnu.org; Thu, 01 Nov 2012 22:11:18 -0400 Received: from /spool/local by e28smtp06.in.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Fri, 2 Nov 2012 07:41:12 +0530 Received: from d28av03.in.ibm.com (d28av03.in.ibm.com [9.184.220.65]) by d28relay02.in.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id qA22BARI35127430 for ; Fri, 2 Nov 2012 07:41:10 +0530 Received: from d28av03.in.ibm.com (loopback [127.0.0.1]) by d28av03.in.ibm.com (8.14.4/8.13.1/NCO v10.0 AVout) with ESMTP id qA22B94p017806 for ; Fri, 2 Nov 2012 13:11:10 +1100 Message-ID: <50932B8B.6070802@linux.vnet.ibm.com> Date: Fri, 02 Nov 2012 10:10:19 +0800 From: Lei Li MIME-Version: 1.0 References: <1351756108-27192-1-git-send-email-lilei@linux.vnet.ibm.com> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH] net: avoid segfault in case netdev_del non-host network device List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Stefan Hajnoczi Cc: qemu-devel On 11/01/2012 05:42 PM, Stefan Hajnoczi wrote: > On Thu, Nov 1, 2012 at 8:48 AM, Lei Li 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 should only be used on -netdev/netdev_add devices. > Therefore my patch raises an error before we call > qemu_del_net_client(nc). > > Stefan > -- Lei