Quoting r. Roland Dreier <[EMAIL PROTECTED]>:
> Subject: Re: user_mad.c: deadlock?
> 
>     Michael> Makes sense?
> 
> No, I think you have to make a copy of the full list of agents and
> clean out the file's list while holding the mutex.  Otherwise
> ib_umad_close() could run while ib_umad_kill_port() is dealing with
> the same file.

And that should be fine since its safe to call list_del after list_del_init.

> And also we need ib_umad_kill_port() to wait for any
> in-progress ib_umad_close() calls, since we don't want to call
> ib_unregister_mad_agent() after we've returned from the device removal
> call.

This should work fine too since the last down_write that  detects
that list list is empty will flush these guys out.

> The locking is a little tricky, I'll work something out.

OK, if you dont manage to, I'll look into it tomorrow.

-- 
MST
_______________________________________________
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