Re: [PATCH] scsi: Improves scsi_vpd_inquiry() checks

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

 



On Wed, Mar 22, 2023 at 11:22:11AM +0900, Damien Le Moal wrote:
> Some USB-SATA adapters have a broken behavior when a non supported VPD
> page is probed: depending on the VPD page number, a 4 byte header with a
> valid VPD page number but with a 0 lenghth is returned. Currently,
> scsi_vpd_inquiry() only checks that the page number is valid to
> determine if the page is supported, which results in VPD page users
> receiving only the 4 B header for the non existent page. This error
> manifests itself very often with page 0xb9 for the concurrent
> Positioning Ranges detection done by sd_read_cpr(), resulting in the
> error message:
> 
> sd 0:0:0:0: [sda] Invalid Concurrent Positioning Ranges VPD page
> 
> Prevent such misleading error message by adding a check in
> scsi_vpd_inquiry() to verify that the page length is not 0.
> 
> Signed-off-by: Damien Le Moal <damien.lemoal@xxxxxxxxxxxxxxxxxx>
> ---
>  drivers/scsi/scsi.c | 11 +++++++++--
>  1 file changed, 9 insertions(+), 2 deletions(-)
> 

Looks good to me.


Reviewed-by: Benjamin Block <bblock@xxxxxxxxxxxxx>

-- 
Best Regards, Benjamin Block        /        Linux on IBM Z Kernel Development
IBM Deutschland Research & Development GmbH    /   https://www.ibm.com/privacy
Vors. Aufs.-R.: Gregor Pillen         /         Geschäftsführung: David Faller
Sitz der Ges.: Böblingen     /    Registergericht: AmtsG Stuttgart, HRB 243294



[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