Re: [PATCH] evdev: Release eventual input device grabs when gettingdisconnected

From: Linus Torvalds
Date: Mon Mar 31 2008 - 14:25:51 EST




On Mon, 31 Mar 2008, Dmitry Torokhov wrote:
>
> Greg, please look at the change again. Before kobject_put(kobj->parent)
> was done in kobject_cleanup() and so the parent would only be freed when
> all its children are gone. Now parent is deleted early, even if its
> children are still referenced by other users. This is lifetime rule
> change and should really be announced as such.
>
> If this change it intentional and is here to stay then I will just grab
> the references myself, although I wonder what else might be broken by
> it.

I do agree that this might want reverting, unless there is some rally good
reason for it. People may have pefectly valid reasons to expect topology
and reachability to remain valid - it's certainly what we guarantee in the
VFS code for similar rules (ie the parent of a dentry is only free'd after
all children have gone away).

Greg, is it possible to get the old lifetime rules back wrt his? They seem
valid and sane..

Linus
--
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/