IB/srp: Avoid that duplicate responses trigger a kernel bug

am: d5d1d2cc4b

Change-Id: I1d6058be1db22b0853190d0a932dc9c1136a5110
This commit is contained in:
Bart Van Assche
2017-03-15 02:22:05 +00:00
committed by android-build-merger

View File

@@ -1880,9 +1880,11 @@ static void srp_process_rsp(struct srp_rdma_ch *ch, struct srp_rsp *rsp)
complete(&ch->tsk_mgmt_done);
} else {
scmnd = scsi_host_find_tag(target->scsi_host, rsp->tag);
if (scmnd) {
if (scmnd && scmnd->host_scribble) {
req = (void *)scmnd->host_scribble;
scmnd = srp_claim_req(ch, req, NULL, scmnd);
} else {
scmnd = NULL;
}
if (!scmnd) {
shost_printk(KERN_ERR, target->scsi_host,