[openib-general] Fwd: issues in ipoib

Roland Dreier rdreier at cisco.com
Wed Aug 2 10:30:46 PDT 2006


    Roland> It's not lockdep, it's just general lock debugging.  And
    Roland> freeing a locked lock is bad practice anyway.
                                   
    Michael> Fine, although I wander why exactly.  I'll just respin
    Michael> with up_read then? But won't down_read up_read look weird
    Michael> too?  Is there some other way to flush out all readers?

It's bad practice because in general you don't know who else is
blocked on the lock getting freed, so freeing it could lead to
deadlock or use-after-free.

In this case using an rwsem seems sort of awkward anyway.  Wouldn't it
match better with what's really going on to have a reference count,
and wait for it to go to zero?

- R.





More information about the general mailing list