提交 c3390df4 编写于 作者: D Don Brace 提交者: Martin K. Petersen

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: NMahesh Rajashekhara <mahesh.rajashekhara@microsemi.com>
Reviewed-by: NJustin Lindley <justin.lindley@microsemi.com>
Reviewed-by: NScott Teel <scott.teel@microsemi.com>
Reviewed-by: NKevin Barnett <kevin.barnett@microsemi.com>
Reviewed-by: NMatthew R. Ochs <mrochs@linux.vnet.ibm.com>
Signed-off-by: NDon Brace <don.brace@microsemi.com>
Signed-off-by: NMartin K. Petersen <martin.petersen@oracle.com>
上级 39f3deb2
...@@ -4981,6 +4981,8 @@ static int hpsa_scsi_ioaccel_raid_map(struct ctlr_info *h, ...@@ -4981,6 +4981,8 @@ static int hpsa_scsi_ioaccel_raid_map(struct ctlr_info *h,
return IO_ACCEL_INELIGIBLE; return IO_ACCEL_INELIGIBLE;
c->phys_disk = dev->phys_disk[map_index]; c->phys_disk = dev->phys_disk[map_index];
if (!c->phys_disk)
return IO_ACCEL_INELIGIBLE;
disk_handle = dd[map_index].ioaccel_handle; disk_handle = dd[map_index].ioaccel_handle;
disk_block = le64_to_cpu(map->disk_starting_blk) + disk_block = le64_to_cpu(map->disk_starting_blk) +
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册