diff options
author | James Smart <james.smart@avagotech.com> | 2015-12-16 18:11:56 -0500 |
---|---|---|
committer | Martin K. Petersen <martin.petersen@oracle.com> | 2015-12-21 21:54:09 -0500 |
commit | 6690e0d4fc5cccf74534abe0c9f9a69032bc02f0 (patch) | |
tree | ab065d3de30d6ef549d874eea31506cdb296f752 /drivers/scsi/lpfc | |
parent | 4b7789b71c916f79a3366da080101014473234c3 (diff) | |
download | op-kernel-dev-6690e0d4fc5cccf74534abe0c9f9a69032bc02f0.zip op-kernel-dev-6690e0d4fc5cccf74534abe0c9f9a69032bc02f0.tar.gz |
lpfc: Fix driver crash when module parameter lpfc_fcp_io_channel set to 16
Fix driver crash when module parameter lpfc_fcp_io_channel set to 16
Signed-off-by: Dick Kennedy <dick.kennedy@avagotech.com>
Signed-off-by: James Smart <james.smart@avagotech.com>
Reviewed-by: Hannes Reinicke <hare@suse.de>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Diffstat (limited to 'drivers/scsi/lpfc')
-rw-r--r-- | drivers/scsi/lpfc/lpfc_init.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/drivers/scsi/lpfc/lpfc_init.c b/drivers/scsi/lpfc/lpfc_init.c index db9446c..5915407 100644 --- a/drivers/scsi/lpfc/lpfc_init.c +++ b/drivers/scsi/lpfc/lpfc_init.c @@ -8833,9 +8833,12 @@ found: * already mapped to this phys_id. */ if (cpup->irq != LPFC_VECTOR_MAP_EMPTY) { - chann[saved_chann] = - cpup->channel_id; - saved_chann++; + if (saved_chann <= + LPFC_FCP_IO_CHAN_MAX) { + chann[saved_chann] = + cpup->channel_id; + saved_chann++; + } goto out; } |