|
|
3c6e85 |
From bff74ada05ccf29f8d1a91835accc21385a9ec3a Mon Sep 17 00:00:00 2001
|
|
|
3c6e85 |
From: Himanshu Madhani <hmadhani@redhat.com>
|
|
|
3c6e85 |
Date: Thu, 1 Aug 2019 15:54:46 -0400
|
|
|
3c6e85 |
Subject: [PATCH 026/124] [scsi] scsi: qla2xxx: Fix panic in
|
|
|
3c6e85 |
qla_dfs_tgt_counters_show
|
|
|
3c6e85 |
|
|
|
3c6e85 |
Message-id: <20190801155618.12650-27-hmadhani@redhat.com>
|
|
|
3c6e85 |
Patchwork-id: 267803
|
|
|
3c6e85 |
O-Subject: [RHEL 7.8 e-stor PATCH 026/118] scsi: qla2xxx: Fix panic in qla_dfs_tgt_counters_show
|
|
|
3c6e85 |
Bugzilla: 1729270
|
|
|
3c6e85 |
RH-Acked-by: Jarod Wilson <jarod@redhat.com>
|
|
|
3c6e85 |
RH-Acked-by: Tony Camuso <tcamuso@redhat.com>
|
|
|
3c6e85 |
|
|
|
3c6e85 |
From: Bill Kuzeja <William.Kuzeja@stratus.com>
|
|
|
3c6e85 |
|
|
|
3c6e85 |
Bugzilla 1729270
|
|
|
3c6e85 |
|
|
|
3c6e85 |
When trying to display tgt_counters in the debugfs, a panic can result.
|
|
|
3c6e85 |
|
|
|
3c6e85 |
There is no null check for qpair after it is assigned in the for-loop.
|
|
|
3c6e85 |
Unless vha->hw->queue_pair_map array is completely filled with entries, the
|
|
|
3c6e85 |
system will panic dereferencing a null pointer.
|
|
|
3c6e85 |
|
|
|
3c6e85 |
Signed-off-by: Bill Kuzeja <william.kuzeja@stratus.com>
|
|
|
3c6e85 |
Acked-by: Himanshu Madhani <hmadhani@marvell.com>
|
|
|
3c6e85 |
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
|
|
|
3c6e85 |
(cherry picked from commit db0f166e9a37215b15d5d732c98fa15219adccf0)
|
|
|
3c6e85 |
Signed-off-by: Himanshu Madhani <hmadhani@redhat.com>
|
|
|
3c6e85 |
Signed-off-by: Jan Stancek <jstancek@redhat.com>
|
|
|
3c6e85 |
---
|
|
|
3c6e85 |
drivers/scsi/qla2xxx/qla_dfs.c | 2 ++
|
|
|
3c6e85 |
1 file changed, 2 insertions(+)
|
|
|
3c6e85 |
|
|
|
3c6e85 |
diff --git a/drivers/scsi/qla2xxx/qla_dfs.c b/drivers/scsi/qla2xxx/qla_dfs.c
|
|
|
3c6e85 |
index 8688372955a0..2903d1e1847d 100644
|
|
|
3c6e85 |
--- a/drivers/scsi/qla2xxx/qla_dfs.c
|
|
|
3c6e85 |
+++ b/drivers/scsi/qla2xxx/qla_dfs.c
|
|
|
3c6e85 |
@@ -193,6 +193,8 @@ qla_dfs_tgt_counters_show(struct seq_file *s, void *unused)
|
|
|
3c6e85 |
|
|
|
3c6e85 |
for (i = 0; i < vha->hw->max_qpairs; i++) {
|
|
|
3c6e85 |
qpair = vha->hw->queue_pair_map[i];
|
|
|
3c6e85 |
+ if (!qpair)
|
|
|
3c6e85 |
+ continue;
|
|
|
3c6e85 |
qla_core_sbt_cmd += qpair->tgt_counters.qla_core_sbt_cmd;
|
|
|
3c6e85 |
core_qla_que_buf += qpair->tgt_counters.core_qla_que_buf;
|
|
|
3c6e85 |
qla_core_ret_ctio += qpair->tgt_counters.qla_core_ret_ctio;
|
|
|
3c6e85 |
--
|
|
|
3c6e85 |
2.13.6
|
|
|
3c6e85 |
|