Re: [Qemu-devel] [PATCH 11/16] scsi-disk: add data direction checking

2010-11-22 Thread Hannes Reinecke
On 11/22/2010 12:20 PM, Christoph Hellwig wrote: > On Thu, Nov 18, 2010 at 03:47:32PM +0100, Hannes Reinecke wrote: >> >> scsi_req_parse() already provides for a data direction setting, >> so we should be using it to check for correct direction. > > Instead of just a debug printf that almost no on

Re: [Qemu-devel] [PATCH 11/16] scsi-disk: add data direction checking

2010-11-22 Thread Christoph Hellwig
On Thu, Nov 18, 2010 at 03:47:32PM +0100, Hannes Reinecke wrote: > > scsi_req_parse() already provides for a data direction setting, > so we should be using it to check for correct direction. Instead of just a debug printf that almost no one compiles in shouldn't we reject the incorrect commands?

[Qemu-devel] [PATCH 11/16] scsi-disk: add data direction checking

2010-11-18 Thread Hannes Reinecke
scsi_req_parse() already provides for a data direction setting, so we should be using it to check for correct direction. Signed-off-by: Hannes Reinecke --- hw/scsi-disk.c | 13 +++-- 1 files changed, 7 insertions(+), 6 deletions(-) diff --git a/hw/scsi-disk.c b/hw/scsi-disk.c index f