diff options
author | Joe Lawrence <joe.lawrence@stratus.com> | 2014-06-25 17:04:22 -0400 |
---|---|---|
committer | Christoph Hellwig <hch@lst.de> | 2014-07-25 17:16:57 -0400 |
commit | 62c4da449db0c5a605f8bf99c5ca735da0c0587f (patch) | |
tree | b16b9f7b8dd09403df50b22047e1a26091410304 /lib | |
parent | 42de597eabc2ba837203788170cc57814a9df7a7 (diff) | |
download | blackbird-op-linux-62c4da449db0c5a605f8bf99c5ca735da0c0587f.tar.gz blackbird-op-linux-62c4da449db0c5a605f8bf99c5ca735da0c0587f.zip |
mpt3sas: correct scsi_{target,device} hostdata allocation
In _scsih_{slave,target}_alloc, an incorrect structure type is passed
to sizeof() when allocating storage for hostdata. Luckily larger
structure types were used, so at least the wrong sizes were safe:
struct scsi_device (1784 bytes) > struct MPT3SAS_DEVICE (24 bytes)
struct scsi_target (760 bytes) > struct MPT3SAS_TARGET (32 bytes)
This fixes the following smatch warnings:
drivers/scsi/mpt3sas/mpt3sas_scsih.c:1166 _scsih_target_alloc()
warn: struct type mismatch 'MPT3SAS_TARGET vs scsi_target'
drivers/scsi/mpt3sas/mpt3sas_scsih.c:1280 _scsih_slave_alloc()
warn: struct type mismatch 'MPT3SAS_DEVICE vs scsi_device'
Signed-off-by: Joe Lawrence <joe.lawrence@stratus.com>
Acked-by: Sreekanth Reddy <Sreekanth.Reddy@avagotech.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
Diffstat (limited to 'lib')
0 files changed, 0 insertions, 0 deletions