From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:57520) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UrPUD-0002NM-Ow for qemu-devel@nongnu.org; Tue, 25 Jun 2013 05:24:34 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UrPU9-0001MB-Li for qemu-devel@nongnu.org; Tue, 25 Jun 2013 05:24:29 -0400 Date: Tue, 25 Jun 2013 11:24:21 +0200 From: Stefan Hajnoczi Message-ID: <20130625092421.GC26177@stefanha-thinkpad.redhat.com> References: <1372000028-27775-1-git-send-email-ronniesahlberg@gmail.com> <1372000028-27775-2-git-send-email-ronniesahlberg@gmail.com> <51C85A4B.8090603@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <51C85A4B.8090603@redhat.com> Subject: Re: [Qemu-devel] [PATCH] Fix iSCSI crash on SG_IO with an iovector List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Paolo Bonzini Cc: 1191606@bugs.launchpad.net, lersek@redhat.com, qemu-devel@nongnu.org, Ronnie Sahlberg , "1.5.x" On Mon, Jun 24, 2013 at 04:40:11PM +0200, Paolo Bonzini wrote: > Il 23/06/2013 17:07, Ronnie Sahlberg ha scritto: > > Don't assume that SG_IO is always invoked with a simple buffer, > > check the iovec_count and if it is >= 1 then we need to pass an array > > of iovectors to libiscsi instead of just a plain buffer. > > > > Signed-off-by: Ronnie Sahlberg > > --- > > block/iscsi.c | 56 +++++++++++++++++++++++++++++++++++++++++++++++++------- > > 1 files changed, 49 insertions(+), 7 deletions(-) > > Cc: qemu-stable@nongnu.org > > Will apply to scsi-next in the next few days. Paolo, there are small whitespace issues that you might like to fix when merging: > > + } else { > > +#if defined(LIBISCSI_FEATURE_IOVECTOR) > > + scsi_task_set_iov_out(acb->task, > > + (struct scsi_iovec *) acb->ioh->dxferp, > > + acb->ioh->iovec_count); Should be 4-space indentation. > > + #else Space before #else?