Linus Torvalds writes: (Summary) I think that's all the sysfs code needs, for
example, since that's what lookup uses.
example, since that's what lookup uses.
And for any other embedded kobj cases, where you can reach the object using some random subsystem pointers, there had better be other locking in place for that pointer lookup vs the last removal. But that's partly why it really has to disallow any kobject_get() of a zero object, because it means that the tear-down has been started, but the tear-down itself may not have had time to get the lock yet (ie kobject_release() may be just about to call the t->release() function).
call the t->release() function).
But maybe I'm missing something subtle.
But maybe I'm missing something subtle.
Linus
Linus
Linus
example, since that's what lookup uses.
And for any other embedded kobj cases, where you can reach the object using some random subsystem pointers, there had better be other locking in place for that pointer lookup vs the last removal. But that's partly why it really has to disallow any kobject_get() of a zero object, because it means that the tear-down has been started, but the tear-down itself may not have had time to get the lock yet (ie kobject_release() may be just about to call the t->release() function).
call the t->release() function).
But maybe I'm missing something subtle.
But maybe I'm missing something subtle.
Linus
Linus
Linus