[openib-general] Fwd: issues in ipoib

Michael S. Tsirkin mst at mellanox.co.il
Thu Aug 3 12:34:00 PDT 2006


Quoting r. Roland Dreier <rdreier at cisco.com>:
> Subject: Re: Fwd: issues in ipoib
> 
>     Michael> No, I think there's no problem - user callback has
>     Michael> finished running and that's all we care about.
> 
> I don't think so -- because then the unregister call can return and
> the client module free the client struct before the wake_up() runs,
> which leads to use-after-free.
> 
>     Michael> But I'd like to point out that using rwsem gets all these
>     Michael> corners right automatically. Reconsider that approach?
> 
> Again, I don't think so -- rwsem just hides the race from you.  There
> is a race with semaphores (access semaphore after waking up waiter)
> which is the original reason for creating struct completion.

Hmm, you are right. So I need to replace the wait queue with completion.
Thanks.

-- 
MST




More information about the general mailing list