提交 bd535451 编写于 作者: J Jayamohan Kallickal 提交者: James Bottomley

[SCSI] be2iscsi: Fix for case where task->sc was cleanedup earlier

This patch fixes a bug where the task->sc was cleaned up earlier on a
different thread, possibly abort, and the completion comes later.

This was causing a crash which has been reported in multiple places
Signed-off-by: NJayamohan Kallickal <jayamohan.kallickal@emulex.com>
Signed-off-by: NMike Christie <michaelc@cs.wisc.edu>
Signed-off-by: NJames Bottomley <JBottomley@Parallels.com>
上级 685e16fd
......@@ -1123,7 +1123,12 @@ be_complete_io(struct beiscsi_conn *beiscsi_conn,
& SOL_STS_MASK) >> 8);
flags = ((psol->dw[offsetof(struct amap_sol_cqe, i_flags) / 32]
& SOL_FLAGS_MASK) >> 24) | 0x80;
if (!task->sc) {
if (io_task->scsi_cmnd)
scsi_dma_unmap(io_task->scsi_cmnd);
return;
}
task->sc->result = (DID_OK << 16) | status;
if (rsp != ISCSI_STATUS_CMD_COMPLETED) {
task->sc->result = DID_ERROR << 16;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册