On 08/14/12 03:19, David Dillow wrote: > On Thu, 2012-08-09 at 15:43 +0000, Bart Van Assche wrote: >> +static struct scsi_cmnd *srp_claim_req(struct srp_target_port *target, >> + struct srp_request *req, >> + struct scsi_cmnd *scmnd, >> + s32 req_lim_delta) >> { >> unsigned long flags; >> >> - srp_unmap_data(req->scmnd, target, req); >> spin_lock_irqsave(&target->lock, flags); >> target->req_lim += req_lim_delta; > > I still think that adding credits back before putting the request on the > free list is a crash waiting to happen. We don't check to see if the > free request list is empty in srp_queuecommand(), so this creates a new > race window where we get a response that gives us credits back, but we > don't have a free request to back them.
I've just posted an updated patch in which the above comment has been addressed, and I've also pushed out a rebased and retested tree to http://github.com/bvanassche/linux/tree/srp-ha. Bart. -- To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html