Re: [PATCH] kobject: introduce kobj_completion

From: Al Viro
Date: Wed Sep 11 2013 - 13:28:22 EST


On Wed, Sep 11, 2013 at 01:00:30PM -0400, Jeff Mahoney wrote:
> A common way to handle kobject lifetimes in embedded in objects with
> different lifetime rules is to pair the kobject with a struct completion.
>
> This introduces a kobj_completion structure that can be used in place
> of the pairing, along with several convenience functions for
> initialization, release, and put-and-wait.

That's very easy to misuse, leading to deadlocks...
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/