]> git.baikalelectronics.ru Git - kernel.git/commit
hpsa: fix allocation sizes for CISS_REPORT_LUNs commands
authorStephen M. Cameron <stephenmcameron@gmail.com>
Fri, 14 Nov 2014 23:26:54 +0000 (17:26 -0600)
committerChristoph Hellwig <hch@lst.de>
Thu, 20 Nov 2014 08:11:24 +0000 (09:11 +0100)
commit6ad7a4a1ffb173d10c2d94d3dd4285fb71fb15cd
tree6f3aa7b0ec667f904dbc397a01784c8eff1b59ba
parent2f1a9401bbb6fb8fa1d0e9f0053378762d295b86
hpsa: fix allocation sizes for CISS_REPORT_LUNs commands

We were allocating roughly double the amount of memory
we should be due to ReportLUNdata and ExtendedReportLUNdata
containing a non-zero sized array but adding extra memory
to allocate as if the array were zero sized.

Track the logical and physical sizes separately.
Allocate the memory based on the specific data
structure sizes.

Signed-off-by: Don Brace <don.brace@pmcs.com>
Reviewed-by: Webb Scales <webb.scales@hp.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
drivers/scsi/hpsa.c
drivers/scsi/hpsa_cmd.h