aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDon Brace <[email protected]>2016-02-23 15:16:34 -0600
committerMartin K. Petersen <[email protected]>2016-02-23 21:27:02 -0500
commitc3390df4751177191b1691df2eba5e71af382d0b (patch)
treebc2fc665fe4f5d6c000fb4678a9b5d649c67251a
parent39f3deb2bead8a3005130f641af11a78f14cdd28 (diff)
hpsa: check for a null phys_disk pointer in ioaccel2 path
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 <[email protected]> Reviewed-by: Justin Lindley <[email protected]> Reviewed-by: Scott Teel <[email protected]> Reviewed-by: Kevin Barnett <[email protected]> Reviewed-by: Matthew R. Ochs <[email protected]> Signed-off-by: Don Brace <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
-rw-r--r--drivers/scsi/hpsa.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/scsi/hpsa.c b/drivers/scsi/hpsa.c
index 589b44ea3107..edbecf84d79d 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) +