Received: from eggs.gnu.org ([2001:4830:134:3::10]:53847) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bmiXe-00019R-8W for qemu-devel@nongnu.org; Wed, 21 Sep 2016 10:30:34 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bmiXY-0007UF-6w for qemu-devel@nongnu.org; Wed, 21 Sep 2016 10:30:29 -0400 Received: from mx0b-001b2d01.pphosted.com ([148.163.158.5]:58190 helo=mx0a-001b2d01.pphosted.com) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bmiXY-0007U6-1K for qemu-devel@nongnu.org; Wed, 21 Sep 2016 10:30:24 -0400 Received: from pps.filterd (m0098420.ppops.net [127.0.0.1]) by mx0b-001b2d01.pphosted.com (8.16.0.17/8.16.0.17) with SMTP id u8LET0Cr147107 for ; Wed, 21 Sep 2016 10:30:23 -0400 Received: from e06smtp13.uk.ibm.com (e06smtp13.uk.ibm.com [195.75.94.109]) by mx0b-001b2d01.pphosted.com with ESMTP id 25khtdk40f-1 (version=TLSv1.2 cipher=AES256-SHA bits=256 verify=NOT) for ; Wed, 21 Sep 2016 10:30:23 -0400 Received: from localhost by e06smtp13.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Wed, 21 Sep 2016 15:30:21 +0100 Received: from b06cxnps4074.portsmouth.uk.ibm.com (d06relay11.portsmouth.uk.ibm.com [9.149.109.196]) by d06dlp01.portsmouth.uk.ibm.com (Postfix) with ESMTP id DCB7517D8062 for ; Wed, 21 Sep 2016 15:32:18 +0100 (BST) Received: from d06av06.portsmouth.uk.ibm.com (d06av06.portsmouth.uk.ibm.com [9.149.37.217]) by b06cxnps4074.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id u8LEUJAD20972030 for ; Wed, 21 Sep 2016 14:30:19 GMT Received: from d06av06.portsmouth.uk.ibm.com (localhost [127.0.0.1]) by d06av06.portsmouth.uk.ibm.com (8.14.4/8.14.4/NCO v10.0 AVout) with ESMTP id u8LEUJ4P005719 for ; Wed, 21 Sep 2016 10:30:19 -0400 Date: Wed, 21 Sep 2016 16:30:16 +0200 From: Cornelia Huck In-Reply-To: <147446365782.4880.9477223746897679434.stgit@bahia> References: <147446363181.4880.18104448248886932114.stgit@bahia> <147446365782.4880.9477223746897679434.stgit@bahia> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Message-Id: <20160921163016.7b4ff3b3.cornelia.huck@de.ibm.com> Subject: Re: [Qemu-devel] [PATCH 3/7] virtio-net: handle virtio_net_handle_ctrl() error List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Greg Kurz Cc: qemu-devel@nongnu.org, Kevin Wolf , "Michael S. Tsirkin" , Jason Wang , Max Reitz , "Aneesh Kumar K.V" , Stefan Hajnoczi , Paolo Bonzini On Wed, 21 Sep 2016 15:14:17 +0200 Greg Kurz wrote: > This error is caused by a buggy guest: let's switch the device to the > broken state instead of terminating QEMU. > > Signed-off-by: Greg Kurz > --- > hw/net/virtio-net.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/hw/net/virtio-net.c b/hw/net/virtio-net.c > index 01f1351554aa..68a448acd81b 100644 > --- a/hw/net/virtio-net.c > +++ b/hw/net/virtio-net.c > @@ -892,8 +892,8 @@ static void virtio_net_handle_ctrl(VirtIODevice *vdev, VirtQueue *vq) > } > if (iov_size(elem->in_sg, elem->in_num) < sizeof(status) || > iov_size(elem->out_sg, elem->out_num) < sizeof(ctrl)) { > - error_report("virtio-net ctrl missing headers"); > - exit(1); > + virtio_error(vdev, "virtio-net ctrl missing headers"); > + return; Do a 'break;' for consistency's sake? > } > > iov_cnt = elem->out_num; >