From 92084715f4d296c99ac120b3b77cf72d5c194c86 Mon Sep 17 00:00:00 2001 From: "Stephen M. Cameron" Date: Fri, 14 Nov 2014 17:26:54 -0600 Subject: 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 Reviewed-by: Webb Scales Signed-off-by: Christoph Hellwig --- drivers/scsi/hpsa_cmd.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'drivers/scsi/hpsa_cmd.h') diff --git a/drivers/scsi/hpsa_cmd.h b/drivers/scsi/hpsa_cmd.h index b5125dc31439..9b19042ff330 100644 --- a/drivers/scsi/hpsa_cmd.h +++ b/drivers/scsi/hpsa_cmd.h @@ -252,7 +252,7 @@ struct ReportExtendedLUNdata { u8 LUNListLength[4]; u8 extended_response_flag; u8 reserved[3]; - struct ext_report_lun_entry LUN[HPSA_MAX_LUN]; + struct ext_report_lun_entry LUN[HPSA_MAX_PHYS_LUN]; }; struct SenseSubsystem_info { -- cgit v1.2.3