From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:39366) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Vjb3b-0002v2-Er for qemu-devel@nongnu.org; Thu, 21 Nov 2013 15:41:07 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Vjb3T-0001kL-0s for qemu-devel@nongnu.org; Thu, 21 Nov 2013 15:40:59 -0500 Received: from mail-ee0-x232.google.com ([2a00:1450:4013:c00::232]:60469) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Vjb3S-0001kF-QO for qemu-devel@nongnu.org; Thu, 21 Nov 2013 15:40:50 -0500 Received: by mail-ee0-f50.google.com with SMTP id e53so121423eek.9 for ; Thu, 21 Nov 2013 12:40:49 -0800 (PST) Sender: Paolo Bonzini Message-ID: <528E6FCC.2060804@redhat.com> Date: Thu, 21 Nov 2013 21:40:44 +0100 From: Paolo Bonzini MIME-Version: 1.0 References: <1383876789-15496-1-git-send-email-vyasevic@redhat.com> <528068C1.7030107@redhat.com> <52808C42.5090504@redhat.com> <528E636D.9090106@redhat.com> In-Reply-To: <528E636D.9090106@redhat.com> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH for-1.7] qdev-properties-system.c: Allow vlan or netdev for -device, not both List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: vyasevic@redhat.com Cc: Jason Wang , qemu-devel@nongnu.org, stefanha@redhat.com Il 21/11/2013 20:47, Vlad Yasevich ha scritto: > 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 >>>> --- >>>> 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 >> >> 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. I missed this when going through pending patches. Stefan, are you picking it up? Paolo