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

am: 944690cdb5

Change-Id: Ia3796823de8637786e2dd9f46ce28de188787b9a
This commit is contained in:
Bart Van Assche
2017-03-15 02:10:49 +00:00
committed by android-build-merger

View File

@@ -1795,9 +1795,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,