On Mon, Dec 19, 2011 at 10:51 PM, David Dillow <dillowda@xxxxxxxx> wrote: > I haven't parsed it all out from your changes just yet, but I think part > of the reason you may have had problems with req->scmd being null in > srp_handle_recv() is due to a new race between the tear down of the > connection and continuing to process completion notifications. The resources used by the QP completion handler are the srp_target port data structure and the QP data structure. And as you can see in srp_remove_target(), the scsi_host_put() call is invoked after srp_disconnect_target(). That last function waits for the DREP notification from the IB CM. That should guarantee that no IB completions arrive during or after the scsi_host_put() call. Or did I miss something ? Note: I haven't observed the req->scmd == NULL condition yet. > > > You lock and unlock here without doing anything in the critical section. > > > > That's on purpose. > > I'm assuming you do this to ensure that everyone has seen the > appropriate state and exited the critical section, then? Best to add a > comment to that effect. OK, will do. Bart. -- To unsubscribe from this list: send the line "unsubscribe linux-scsi" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html