Commit 2ef2a2d5 authored by Brian King's avatar Brian King Committed by James Bottomley

[PATCH] ipr: Device remove cleanup

If a device disappears across an adapter reset, ipr schedules the device to be
removed from scsi core. Any ops sent to that device prior to its actual removal
end up getting sent to the adapter using a now invalid adapter resource handle.
Usually, the adapter will just fail the command and the failure will end up
looking like a selection timeout, but it is possible the resource handle
has been re-used by the adapter and we could be sending an op to a different
device than we think we are. This patch closes this window.
Signed-off-by: default avatarBrian King <brking@us.ibm.com>
Signed-off-by: default avatarJames Bottomley <James.Bottomley@SteelEye.com>
parent 619c4e95
......@@ -4500,6 +4500,7 @@ static int ipr_init_res_table(struct ipr_cmnd *ipr_cmd)
list_for_each_entry_safe(res, temp, &old_res, queue) {
if (res->sdev) {
res->del_from_ml = 1;
res->sdev->hostdata = NULL;
list_move_tail(&res->queue, &ioa_cfg->used_res_q);
} else {
list_move_tail(&res->queue, &ioa_cfg->free_res_q);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment