Skip to content

Commit fe71b03

Browse files
KAGA-KOKOgregkh
authored andcommitted
IB/srp: Fix srp_abort()
commit e68088e upstream. Before commit e494f6a ("[SCSI] improved eh timeout handler") it did not really matter whether or not abort handlers like srp_abort() called .scsi_done() when returning another value than SUCCESS. Since that commit however this matters. Hence only call .scsi_done() when returning SUCCESS. Signed-off-by: Bart Van Assche <bart.vanassche@wdc.com> Cc: stable@vger.kernel.org Signed-off-by: Jason Gunthorpe <jgg@mellanox.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
1 parent 0bb5579 commit fe71b03

1 file changed

Lines changed: 5 additions & 3 deletions

File tree

‎drivers/infiniband/ulp/srp/ib_srp.c‎

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2656,9 +2656,11 @@ static int srp_abort(struct scsi_cmnd *scmnd)
26562656
ret = FAST_IO_FAIL;
26572657
else
26582658
ret = FAILED;
2659-
srp_free_req(ch, req, scmnd, 0);
2660-
scmnd->result = DID_ABORT << 16;
2661-
scmnd->scsi_done(scmnd);
2659+
if (ret == SUCCESS) {
2660+
srp_free_req(ch, req, scmnd, 0);
2661+
scmnd->result = DID_ABORT << 16;
2662+
scmnd->scsi_done(scmnd);
2663+
}
26622664

26632665
return ret;
26642666
}

0 commit comments

Comments
 (0)