Two more ib_srp patches
Subsystems (2)
Hello Dave,
I think I have found two additional (longstanding) ib_srp issues. Do the patches below make sense to you ? If so, do you prefer that I post these as individual patches or that I merge these in the patch called "[PATCH 01/20] ib_srp: Fix a race condition" ?
Thanks,
Bart.
[PATCH 1/2] ib_srp: Fix use-after-free in srp_reset_req()
--- drivers/infiniband/ulp/srp/ib_srp.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
(quoted diff) +0 -0
b/drivers/infiniband/ulp/srp/ib_srp.c
index f5e2180..42b7ef6 100644
drivers/infiniband/ulp/srp/ib_srp.c +0 -0
@@ -806,9 +806,9 @@ static void srp_reset_req(struct srp_target_port
*target, struct srp_request *re
struct scsi_cmnd *scmnd = srp_claim_req(target, req, NULL);
if (scmnd) {
+ srp_free_req(target, req, scmnd, 0);
scmnd->result = DID_RESET << 16;
scmnd->scsi_done(scmnd);
- srp_free_req(target, req, scmnd, 0);
}
}
[PATCH 2/2] ib_srp: Avoid that aborted requests cause I/O to hang
--- drivers/infiniband/ulp/srp/ib_srp.c | 1 + 1 files changed, 1 insertions(+), 0 deletions(-)
(quoted diff) +0 -0
b/drivers/infiniband/ulp/srp/ib_srp.c
index 42b7ef6..7ae5a00 100644
drivers/infiniband/ulp/srp/ib_srp.c +1 -0
@@ -1927,6 +1927,7 @@ static int srp_abort(struct scsi_cmnd *scmnd) SRP_TSK_ABORT_TASK);srp_free_req (target, req, scmnd,0 ); scmnd->result =DID_ABORT <<16 ; + scmnd->scsi_done (scmnd);return SUCCESS ; }
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
A message that is not in the archive (sent off-list or not yet received): [email protected]
Quoted 6 lines · Bart Van Assche
Hello Dave,
I think I have found two additional (longstanding)
ib_srpissues. Do the patches below make sense to you ? If so, do you prefer that I post these as individual patches or that I merge these in the patch called "[PATCH 01/20]ib_srp: Fix a race condition" ?
Separate patches are fine.
Quoted 1 line
[PATCH 1/2]
ib_srp: Fix use-after-free insrp_reset_req()
This needs to have a commit message along the lines of "srp_free_req() uses the scsi_cmnd structure to unmap buffers, so we must do that before we call release ownership by calling scsi_done()."
But otherwise
Quoted 1 line
[PATCH 2/2]
ib_srp: Avoid that aborted requests cause I/O to hang
Signature · 10 lines
Dave Dillow National Center for Computational Science Oak Ridge National Laboratory (865) 241-6602 office -- To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
A message that is not in the archive (sent off-list or not yet received): 1345216056.17811.7.camel-zHLflQxYYDO4Hhoo1DtQwJ9G+ZOsUmrO@public.gmane.org
Quoted 9 lines · David Dillow
Quoted 6 lines · Bart Van Assche
Hello Dave,
I think I have found two additional (longstanding)
ib_srpissues. Do the patches below make sense to you ? If so, do you prefer that I post these as individual patches or that I merge these in the patch called "[PATCH 01/20]ib_srp: Fix a race condition" ?Separate patches are fine.
Yes, please send new separate patches, I already merged the race fix and I'm planning on sending a pull request to Linus shortly.
[ugh, reply-to-all this time, sorry for the dupe Dave]
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html