Michael S. Tsirkin wrote: > ib_ucm_cleanup_events has file_mutex while calling ib_destroy_cm_id. > It seems this can deadlock since ib_destroy_cm_id flushes event > handlers, and ib_ucm_event_handler needs file_mutex, too. > > Signed-off-by: Michael S. Tsirkin <[EMAIL PROTECTED]> > > --- > > I'll be testing the following the next night - but it seems a right > thing to do regardless of whether it fixes the issues I reported > earlier. Sean, does this make sense to you? If yes, please ack for 2.6.19.
Yes - this looks right to me. Acked-by: Sean Hefty <[EMAIL PROTECTED]> > diff --git a/drivers/infiniband/core/ucm.c b/drivers/infiniband/core/ucm.c > index ad4f4d5..0128288 100644 > --- a/drivers/infiniband/core/ucm.c > +++ b/drivers/infiniband/core/ucm.c > @@ -161,12 +161,14 @@ static void ib_ucm_cleanup_events(struct > struct ib_ucm_event, ctx_list); > list_del(&uevent->file_list); > list_del(&uevent->ctx_list); > + mutex_unlock(&ctx->file->file_mutex); > > /* clear incoming connections. */ > if (ib_ucm_new_cm_id(uevent->resp.event)) > ib_destroy_cm_id(uevent->cm_id); > > kfree(uevent); > + mutex_lock(&ctx->file->file_mutex); > } > mutex_unlock(&ctx->file->file_mutex); > } > > > _______________________________________________ openib-general mailing list openib-general@openib.org http://openib.org/mailman/listinfo/openib-general To unsubscribe, please visit http://openib.org/mailman/listinfo/openib-general