[openib-general] Re: [PATCH] cm refcount race fix

Roland Dreier rdreier at cisco.com
Mon May 8 09:15:13 PDT 2006


 > 	atomic_dec(&obj->refcount);
 > 	wait_event(&obj->wait, !atomic_read(&obj->refcount))
 > 	spin_lock_irq(&obj->lock);
 > 	spin_unlock_irq(&obj->lock);
 > 	kfree(obj);

Yeah, that seems to work.  I wonder if there's a cleaner way though --
this sort of empty locked section is not exactly idiomatic.

 - R.



More information about the general mailing list