[Qemu-devel] [PATCH] Fix iSCSI crash on SG_IO with an iovector

2013-06-20 Thread Ronnie Sahlberg
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 | 31 --- 1 files changed,

[Qemu-devel] [PATCH] Fix iSCSI crash on SG_IO with an iovector

2013-06-21 Thread Ronnie Sahlberg
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 +-

[Qemu-devel] [PATCH] Fix iSCSI crash on SG_IO with an iovector

2013-06-23 Thread Ronnie Sahlberg
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 +

Re: [Qemu-devel] [PATCH] Fix iSCSI crash on SG_IO with an iovector

2013-06-25 Thread Paolo Bonzini
Il 25/06/2013 11:24, Stefan Hajnoczi ha scritto: > 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

Re: [Qemu-devel] [PATCH] Fix iSCSI crash on SG_IO with an iovector

2013-06-23 Thread Laszlo Ersek
On 06/22/13 03:37, Ronnie Sahlberg wrote: > 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 |

Re: [Qemu-devel] [PATCH] Fix iSCSI crash on SG_IO with an iovector

2013-06-23 Thread Laszlo Ersek
On 06/23/13 17:07, Ronnie Sahlberg wrote: > 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

Re: [Qemu-devel] [PATCH] Fix iSCSI crash on SG_IO with an iovector

2013-06-24 Thread Paolo Bonzini
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/i

Re: [Qemu-devel] [PATCH] Fix iSCSI crash on SG_IO with an iovector

2013-06-25 Thread Stefan Hajnoczi
On Fri, Jun 21, 2013 at 06:37:18PM -0700, Ronnie Sahlberg wrote: Looks fine except these whitespace issues: > @@ -727,14 +730,36 @@ static BlockDriverAIOCB > *iscsi_aio_ioctl(BlockDriverState *bs, > memcpy(&acb->task->cdb[0], acb->ioh->cmdp, acb->ioh->cmd_len); > acb->task->expxferlen

Re: [Qemu-devel] [PATCH] Fix iSCSI crash on SG_IO with an iovector

2013-06-25 Thread Stefan Hajnoczi
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 jus