lkml.org 
[lkml]   [2007]   [Apr]   [22]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH RFD] alternative kobject release wait mechanism
On Sat, Apr 21, 2007 at 05:36:51PM -0400, Alan Stern wrote:
> On Fri, 20 Apr 2007, Greg KH wrote:
>
> > > Greg, do you know of anything in particular that depends on a kobjects not
> > > being released before their children are released?
> >
> > Yes, the whole driver model :)
>
> But anything in particular? Looking through the source code, I see
> kobj->parent gets used mainly by kobject_get_path() and not by much else.

Which is essencial for when a kobject is removed from the system and we
need to tell userspace which kobject it was.

> Looking some more, kobject_get_path() is used for kobject renaming,
> uevent handling, and a little bit in the input core. None of these things
> should try to access a kobject after it has been del()ed. After all, it's
> no longer present in the filesystem so it doesn't _have_ a path.

But we _have_ to have a full path at that time to tell userspace what
just went away. That is the main reason we enforce this (there were
tons of issues with scsi devices and this in the past which is what
caused us to enforce this.)

thanks,

greg k-h
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2007-04-22 19:45    [W:0.155 / U:0.056 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site