Re: [PATCH 1 10/25] hpsa: correct check for non-disk devices

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

 



On 10/28/2015 11:05 PM, Don Brace wrote:
> The driver is using two MACROs which seemingly are looking in
> the wrong location for the device_flags returned from
> CISS_REPORT_PHYS. Both MACROs, NON_DISK_PHYS_DEV and
> PHYS_IOACCEL, are using the pointer returned from figure_lunaddrbytes
> which is the address of the LUN.lunid element in
> the extended CISS_REPORT_PHYS.  But the MACROS are using offsets
> beyond the range of the element (offset 17 of an 8 byte element).
> 
> These MACROs actually are looking at the correct location but
> they fail static checker analysis. It also will not work
> if any new elements are added to the extended LUN structure.
> 
> Change the code to use the structure elements directly
> since this MACRO is only used in one location.
> 
> Reported-by: Dan Carpenter <dan.carpenter@xxxxxxxxxx>
> Reviewed-by: Scott Teel <scott.teel@xxxxxxxx>
> Reviewed-by: Justin Lindley <justin.lindley@xxxxxxxx>
> Reviewed-by: Kevin Barnett <kevin.barnett@xxxxxxxx>
> Signed-off-by: Don Brace <don.brace@xxxxxxxx>
> ---
>  drivers/scsi/hpsa.c     |   28 +++++++++++++++-------------
>  drivers/scsi/hpsa_cmd.h |    2 --
>  2 files changed, 15 insertions(+), 15 deletions(-)
> 
Reviewed-by: Hannes Reinecke <hare@xxxxxxx>

Cheers,

Hannes
-- 
Dr. Hannes Reinecke		      zSeries & Storage
hare@xxxxxxx			      +49 911 74053 688
SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg
GF: J. Hawn, J. Guild, F. Imendörffer, HRB 16746 (AG Nürnberg)
--
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