Quantcast
Channel: lkml.org : Ganesh Sittampalam
Viewing all articles
Browse latest Browse all 627

Re: [PATCH 1/2] drivers: core: Don't try to use a dead glue_dir

$
0
0
Linus Torvalds writes: (Summary) Pick one of two scenarios:
one of two scenarios:
(a) it's obviously correct.
(a) it's obviously correct.
We obviously can *not* take an object with a zero refcount, because it is already been scheduled for kobject_cleanup(), and incrementing the refcount is simply fundamentally wrong, because incrementing the refcount won't unschedule the deletion of the object. Which means that (a) is the right reaction, and "kobject_get()" on an object with a zero refcount is _always_ wrong.
refcount is _always_ wrong.
But that says that "yes, the patch is obviously correct", but it also says "the patch should be pointless, because kobject_get() should just _always_ have the semantics of "kobject_get_unless_zero()", and the latter shouldn't even exist.
latter shouldn't even exist.
Greg?

Viewing all articles
Browse latest Browse all 627

Trending Articles