lkml.org 
[lkml]   [2002]   [Oct]   [8]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [RFC] embedded struct device Re: [patch] IDE driver model update

On Tue, 8 Oct 2002, Alexander Viro wrote:
> That would be nice, if it worked that way. As it is we have
>
> driver allocates foo
> driver grabs a reference to foo->dev
> ....
> somebody else grabs/drops temporary references to foo->dev
> ....
> driver call put_device(&foo->dev)
> driver frees structures refered from foo.
> driver frees foo.
>
> _IF_ the last two steps were done by ->release(), your arguments would
> work. Actually they are done by driver right after the put_device() call.

Right. But that's a driver bug, and it's because this whole thing is
fairly new.

There aren't that many things that actually play with these things (mainly
the PCI and the USB layer, and individual drivers shouldn't care, it's
just the bus layer that does all of this), so we should be able to fix the
cases cleanly.

Linus

-
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 13:29    [W:0.196 / U:0.024 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site