lkml.org 
[lkml]   [2004]   [Jun]   [4]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: struct device::release issue
On Sat, Mar 27, 2004 at 03:26:25PM +0100, Frank A. Uepping wrote:
> On Saturday 27 March 2004 02:14, Greg KH wrote:
> > On Sat, Mar 06, 2004 at 12:47:24PM +0100, Frank A. Uepping wrote:
> > > Hi,
> > > if device_add fails (e.g. bus_add_device returns an error) then the release
> > > method will be called for the device. Is this a bug or a feature?
> >
> > Are you sure this will happen? device_initialize() gets a reference
> > that is still present after device_add() fails, right? So release()
> > will not get called.
> At the label PMError, kobject_unregister is called, which decrements the
> recount by 2, which will result in calling release at label Done (put_device).
>
> kobject_unregister should be superseded by kobject_del.
> Here is a patch:

Sorry for the long delay. You are correct, I've applied this patch. It
will show up in the next -mm release and will go to Linus after 2.6.7 is
out.

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: 2005-03-22 14:03    [W:0.298 / U:0.360 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site