]> www.infradead.org Git - users/jedix/linux-maple.git/commitdiff
be2iscsi 4.1.239.0 [PATCH 07/10] Fix for case where task->sc was cleanedup earlier
authorChuck Anderson <chuck.anderson@oracle.com>
Sat, 17 Dec 2011 04:07:40 +0000 (20:07 -0800)
committerChuck Anderson <chuck.anderson@oracle.com>
Sat, 17 Dec 2011 04:07:40 +0000 (20:07 -0800)
Dec. 16, 2011
Oracle bugzilla 13257
Oracle bug 13465921
be2iscsi HBA driver v4.1.239.0 patch set for UEK R2(2.6.39)
jayamohan.kallickal@emulex.com

Ported driver version 4.1.239.0 to UEK2 2.6.39-100.0.17 (was 2.103.298.0)

Comments from the patch headers:

 Commit ID : bd5354511d00cb9c81c64b0544786807a2209488
 [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
---
 be_main.c |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)

Signed-off-by: Chuck Anderson <chuck.anderson@oracle.com>
drivers/scsi/be2iscsi/be_main.c

index 28fa5e0efd633b97698ac227a4791b930b1ea425..ba041420113bc1e24f900bedc23d545fe718c07c 100644 (file)
@@ -1176,7 +1176,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;