[PATCH 0/2] SCSI: fix bug in scsi_dev_info_list lookup

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

 



James:

Giulio Bernardi recently reported a problem (the second Logical Unit of
his SATA-USB docking station was not being detected) which we traced
down to a bug in the matching code in scsi_devinfo.c.  The entire
search algorithm (including the bug) is present in two separate 
routines of that source file.

The first patch in the following sequence refactors the matching code 
by moving it into its own subroutine, where the others can call it.

The second patch fixes the matching code's bug.  Namely, the code
thinks it has found a match if either the device's vendor string (with
leading blanks removed) or the device list entry's vendor string is a
substring of the other, and likewise for the product strings.  For
example, a device string of "VENDOR12" would match against a list
entry's string of "VENDOR", which obviously is not what we want.

Alan Stern

--
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