linux-scsi.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 05/17] lpfc: Fix driver crash when module parameter lpfc_fcp_io_channel set to 16
@ 2015-12-16 23:11 James Smart
  2015-12-17  8:18 ` Hannes Reinecke
  0 siblings, 1 reply; 2+ messages in thread
From: James Smart @ 2015-12-16 23:11 UTC (permalink / raw)
  To: linux-scsi


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>
---
 drivers/scsi/lpfc/lpfc_init.c | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)

diff --git a/drivers/scsi/lpfc/lpfc_init.c b/drivers/scsi/lpfc/lpfc_init.c
index ab27d81..bd6aa8d 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;
 				}
 
-- 
1.7.11.7


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH 05/17] lpfc: Fix driver crash when module parameter lpfc_fcp_io_channel set to 16
  2015-12-16 23:11 [PATCH 05/17] lpfc: Fix driver crash when module parameter lpfc_fcp_io_channel set to 16 James Smart
@ 2015-12-17  8:18 ` Hannes Reinecke
  0 siblings, 0 replies; 2+ messages in thread
From: Hannes Reinecke @ 2015-12-17  8:18 UTC (permalink / raw)
  To: James Smart, linux-scsi

On 12/17/2015 12:11 AM, James Smart wrote:
>
> 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>
> ---
>   drivers/scsi/lpfc/lpfc_init.c | 9 ++++++---
>   1 file changed, 6 insertions(+), 3 deletions(-)
>
Reviewed-by: Hannes Reinecke <hare@suse.com>

Cheers,

Hannes
-- 
Dr. Hannes Reinecke		               zSeries & Storage
hare@suse.de			               +49 911 74053 688
SUSE LINUX GmbH, Maxfeldstr. 5, 90409 Nürnberg
GF: F. Imendörffer, J. Smithard, J. Guild, D. Upmanyu, G. Norton
HRB 21284 (AG Nürnberg)
--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2015-12-17  8:18 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-12-16 23:11 [PATCH 05/17] lpfc: Fix driver crash when module parameter lpfc_fcp_io_channel set to 16 James Smart
2015-12-17  8:18 ` Hannes Reinecke

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).