Re: [RFC] embedded struct device Re: [patch] IDE driver model update

From: Linus Torvalds (
Date: Tue Oct 08 2002 - 17:12:03 EST

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.


To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
More majordomo info at
Please read the FAQ at

This archive was generated by hypermail 2b29 : Tue Oct 15 2002 - 22:00:28 EST