BTW, I think the patch below is correct as well.  This avoids problems
where the SRP driver waits forever for a completion, for example if
sending the DREQ fails because the connection has already been
disconnected by the target.

Does this scenario seem like the deadlock you thought you saw?

--- linux-kernel/infiniband/ulp/srp/ib_srp.c    (revision 7245)
+++ linux-kernel/infiniband/ulp/srp/ib_srp.c    (working copy)
@@ -342,7 +342,10 @@ static void srp_disconnect_target(struct
        /* XXX should send SRP_I_LOGOUT request */
 
        init_completion(&target->done);
-       ib_send_cm_dreq(target->cm_id, NULL, 0);
+       if (ib_send_cm_dreq(target->cm_id, NULL, 0)) {
+               printk(KERN_DEBUG PFX "Sending CM DREQ failed\n");
+               return;
+       }
        wait_for_completion(&target->done);
 }
 
_______________________________________________
openib-general mailing list
[email protected]
http://openib.org/mailman/listinfo/openib-general

To unsubscribe, please visit http://openib.org/mailman/listinfo/openib-general

Reply via email to