From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:39913) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bnQaB-0003AP-B0 for qemu-devel@nongnu.org; Fri, 23 Sep 2016 09:32:04 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bnQa8-0006xG-6N for qemu-devel@nongnu.org; Fri, 23 Sep 2016 09:32:03 -0400 Received: from mx1.redhat.com ([209.132.183.28]:53188) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bnQa7-0006x5-TS for qemu-devel@nongnu.org; Fri, 23 Sep 2016 09:32:00 -0400 Date: Fri, 23 Sep 2016 14:31:56 +0100 From: Stefan Hajnoczi Message-ID: <20160923133156.GN8221@stefanha-x1.localdomain> References: <147447700612.30952.9420141963781948805.stgit@bahia> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="Pjk796cY0SfIo9Z2" Content-Disposition: inline In-Reply-To: <147447700612.30952.9420141963781948805.stgit@bahia> Subject: Re: [Qemu-devel] [PATCH v2 0/9] virtio: avoid inappropriate QEMU termination 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" , Cornelia Huck , Paolo Bonzini --Pjk796cY0SfIo9Z2 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed, Sep 21, 2016 at 06:56:46PM +0200, Greg Kurz wrote: > This series is a follow up to Stefan's work to eradicate most calls to > exit() we currently have in the virtio code. >=20 > It addresses all exit() call sites in the blk, net and scsi device code, > where the error is about a missing or malformed in/out header sent by > the guest. They are converted to use virtio_error() and stop any processi= ng, > instead of exiting. >=20 > The remaining call sites are related to a host misconfiguration or a > migration stream issue. >=20 > The 9P code currently calls assert() instead of exit(), but it also about > malformed or missing headers, so it gets converted the same way. >=20 > Next work will be to check all assert() call sites in the device code, in > case some of them actually refer to a bug in the guest, and should be > converted to use virtio_error() as well. >=20 > --- >=20 > Greg Kurz (9): > virtio-9p: add parentheses to sizeof operator > virtio-blk: turn virtio_blk_handle_request() into a static function > virtio-9p: handle handle_9p_output() error > virtio-blk: handle virtio_blk_handle_request() errors > virtio-net: handle virtio_net_handle_ctrl() error > virtio-net: handle virtio_net_receive() errors > virtio-net: handle virtio_net_flush_tx() errors > virtio-scsi: convert virtio_scsi_bad_req() to use virtio_error() > virtio-scsi: handle virtio_scsi_set_config() error >=20 >=20 > hw/9pfs/virtio-9p-device.c | 24 ++++++++++++++----- > hw/block/virtio-blk.c | 28 ++++++++++++++-------- > hw/net/virtio-net.c | 51 +++++++++++++++++++++++-----------= ------ > hw/scsi/virtio-scsi.c | 23 ++++++++++-------- > include/hw/virtio/virtio-blk.h | 2 -- > 5 files changed, 78 insertions(+), 50 deletions(-) I'll review the next revision fully. Please consider the leaks caused by returning with a VirtQueueElement allocated. I pointed them out in a few patches. --Pjk796cY0SfIo9Z2 Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEcBAEBAgAGBQJX5S7MAAoJEJykq7OBq3PI0gMH/j92tiP93mjRE35pBJLrY3oU lSiNllO6kTThaJRuXusxRPkqH01MvuBSj0PUb1oFhVsW98SfyNbCktXbo7VhkYKd slUMh7zhaV/QnhUFezAZtila8uOLz9cbBIbrzOfH18KjDotqqwQREbXNwxrJypsQ DykuF4pnriwPtidhSDdeYTNASmfFmriw6WqtG9JZB3lqYuPmdCAll90L10Xsc7pv id1oK0rqEnwXrwakHX6rX540rKgP5OuXJNHz1+DgWmWA6EPqid3gFvTga18RgANI xQlxWYyBIA9I5iEeplIO3t2tlilAf6pM6lAuC4VBgS6dXd8xgSvp02CJ7jM6/V0= =yqS5 -----END PGP SIGNATURE----- --Pjk796cY0SfIo9Z2--