diff options
author | adam radford <aradford@gmail.com> | 2012-10-02 04:27:12 +0200 |
---|---|---|
committer | James Bottomley <JBottomley@Parallels.com> | 2012-10-09 12:19:11 +0200 |
commit | e187df63991b1b50af0fd3cf8ceaf9aa77c20f4a (patch) | |
tree | aa1ec67702069b462fe584acc361064480479b08 /drivers/scsi | |
parent | [SCSI] megaraid_sas: Load io_request DataLength in bytes (diff) | |
download | linux-e187df63991b1b50af0fd3cf8ceaf9aa77c20f4a.tar.xz linux-e187df63991b1b50af0fd3cf8ceaf9aa77c20f4a.zip |
[SCSI] megaraid_sas: Add array boundary check for SystemPD
Signed-off-by: Adam Radford <aradford@gmail.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
Diffstat (limited to 'drivers/scsi')
-rw-r--r-- | drivers/scsi/megaraid/megaraid_sas_fusion.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/scsi/megaraid/megaraid_sas_fusion.c b/drivers/scsi/megaraid/megaraid_sas_fusion.c index 31d397497c45..ad6e2ac196b0 100644 --- a/drivers/scsi/megaraid/megaraid_sas_fusion.c +++ b/drivers/scsi/megaraid/megaraid_sas_fusion.c @@ -1508,7 +1508,8 @@ megasas_build_dcdb_fusion(struct megasas_instance *instance, 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; |