An oops can occur when submitting ioaccel2 commands
when the phys_disk pointer is NULL in hpsa_scsi_ioaccel_raid_map.
Happens when there are configuration changes during I/O operations.

If the phys_disk pointer is NULL, send the command down the RAID path.

Reviewed-by: Mahesh Rajashekhara <mahesh.rajashekh...@microsemi.com>
Reviewed-by: Justin Lindley <justin.lind...@microsemi.com>
Reviewed-by: Scott Teel <scott.t...@microsemi.com>
Reviewed-by: Kevin Barnett <kevin.barn...@microsemi.com>
Signed-off-by: Don Brace <don.br...@microsemi.com>
---
 drivers/scsi/hpsa.c |    2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/scsi/hpsa.c b/drivers/scsi/hpsa.c
index 589b44e..edbecf8 100644
--- a/drivers/scsi/hpsa.c
+++ b/drivers/scsi/hpsa.c
@@ -4981,6 +4981,8 @@ static int hpsa_scsi_ioaccel_raid_map(struct ctlr_info *h,
                return IO_ACCEL_INELIGIBLE;
 
        c->phys_disk = dev->phys_disk[map_index];
+       if (!c->phys_disk)
+               return IO_ACCEL_INELIGIBLE;
 
        disk_handle = dd[map_index].ioaccel_handle;
        disk_block = le64_to_cpu(map->disk_starting_blk) +

--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to