> 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.