RE: scsi_lib: fix scsi_io_completion's SG_IO error propagation

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Thanks Mike. Looks good.

> -----Original Message-----
> From: Mike Snitzer [mailto:snitzer@xxxxxxxxxx]
> Sent: Thursday, May 31, 2012 3:24 PM
> To: Paolo Bonzini
> Cc: linux-scsi@xxxxxxxxxxxxxxx; Moger, Babu; hare@xxxxxxx;
> michaelc@xxxxxxxxxxx; James.Bottomley@xxxxxxxxxxxxxxxxxxxxx;
> stable@xxxxxxxxxxxxxxx.#.3.4
> Subject: Re: scsi_lib: fix scsi_io_completion's SG_IO error propagation
> 
> On Thu, May 31 2012 at  3:51pm -0400,
> Paolo Bonzini <pbonzini@xxxxxxxxxx> wrote:
> 
> > Il 31/05/2012 21:05, Mike Snitzer ha scritto:
> > > The following v3.4-rc1 commit unmasked an existing bug in
> > > scsi_io_completion's SG_IO error handling:
> > > 47ac56d [SCSI] scsi_error: classify some ILLEGAL_REQUEST sense as a
> permanent TARGET_ERROR
> > >
> > > Given that certain ILLEGAL_REQUEST are now properly categorized as
> > > TARGET_ERROR the host_byte is being set (before host_byte wasn't ever
> > > set for these ILLEGAL_REQUEST).
> > >
> > > In scsi_io_completion, initialize req->errors with cmd->result _after_
> > > the SG_IO block that calls __scsi_error_from_host_byte (which may
> > > modify the host_byte).
> > >
> > > Before this fix:
> > >
> > >     cdb to send: 12 01 01 00 00 00
> > > ioctl(3, SG_IO, {'S', SG_DXFER_NONE, cmd[6]=[12, 01, 01, 00, 00, 00],
> > >     mx_sb_len=32, iovec_count=0, dxfer_len=0, timeout=20000, flags=0,
> > >     status=02, masked_status=01, sb[19]=[70, 00, 05, 00, 00, 00, 00, 0b,
> > >     00, 00, 00, 00, 24, 00, 00, 00, 00, 00, 00], host_status=0x10,
> > >     driver_status=0x8, resid=0, duration=0, info=0x1}) = 0
> > > SCSI Status: Check Condition
> > >
> > > Sense Information:
> > > sense buffer empty
> > >
> > > After:
> > >
> > >     cdb to send: 12 01 01 00 00 00
> > > ioctl(3, SG_IO, {'S', SG_DXFER_NONE, cmd[6]=[12, 01, 01, 00, 00, 00],
> > >     mx_sb_len=32, iovec_count=0, dxfer_len=0, timeout=20000, flags=0,
> > >     status=02, masked_status=01, sb[19]=[70, 00, 05, 00, 00, 00, 00, 0b,
> > >     00, 00, 00, 00, 24, 00, 00, 00, 00, 00, 00], host_status=0,
> > >     driver_status=0x8, resid=0, duration=0, info=0x1}) = 0
> > > SCSI Status: Check Condition
> > >
> > > Sense Information:
> > >  Fixed format, current;  Sense key: Illegal Request
> > >  Additional sense: Invalid field in cdb
> > >  Raw sense data (in hex):
> > >         70 00 05 00 00 00 00 0b  00 00 00 00 24 00 00 00
> > >         00 00 00
> > >
> > > Signed-off-by: Mike Snitzer <snitzer@xxxxxxxxxx>
> > > Reviewed-by: Babu Moger <babu.moger@xxxxxxxxxx>
> >
> > Reported-by: Paolo Bonzini <pbonzini@xxxxxxxxxx>
> > Tested-by: Paolo Bonzini <pbonzini@xxxxxxxxxx>
> 
> Yes, thanks for backfilling the Reported-by and Tested-by Paolo!
--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [SCSI Target Devel]     [Linux SCSI Target Infrastructure]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Samba]     [Device Mapper]
  Powered by Linux