James/linux-scsi, The following patch for megaraid_sas adds an array boundary check for the SystemPD build path.
Signed-off-by: Adam Radford <aradf...@gmail.com> diff -Naur scsi-misc/drivers/scsi/megaraid/megaraid_sas_fusion.c scsi-misc.new/drivers/scsi/megaraid/megaraid_sas_fusion.c --- scsi-misc/drivers/scsi/megaraid/megaraid_sas_fusion.c 2012-10-01 17:05:01.643925591 -0700 +++ scsi-misc.new/drivers/scsi/megaraid/megaraid_sas_fusion.c 2012-10-01 17:06:40.300862878 -0700 @@ -1508,7 +1508,8 @@ local_map_ptr = fusion->ld_map[(instance->map_id & 1)]; /* Check if this is a system PD I/O */ - if (instance->pd_list[pd_index].driveState == MR_PD_STATE_SYSTEM) { + if (scmd->device->channel < MEGASAS_MAX_PD_CHANNELS && + instance->pd_list[pd_index].driveState == MR_PD_STATE_SYSTEM) { io_request->Function = 0; io_request->DevHandle = local_map_ptr->raidMap.devHndlInfo[device_id].curDevHdl;
megaraid_sas.patch4
Description: Binary data