linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Linus Torvalds <torvalds@transmeta.com>
To: Alexander Viro <viro@math.psu.edu>
Cc: Patrick Mochel <mochel@osdl.org>,
	Alan Cox <alan@lxorguk.ukuu.org.uk>, <andre@linux-ide.org>,
	<linux-kernel@vger.kernel.org>
Subject: Re: [RFC] embedded struct device Re: [patch] IDE driver model update
Date: Tue, 8 Oct 2002 15:12:03 -0700 (PDT)	[thread overview]
Message-ID: <Pine.LNX.4.44.0210081510550.1226-100000@home.transmeta.com> (raw)
In-Reply-To: <Pine.GSO.4.21.0210081735370.5897-100000@weyl.math.psu.edu>


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


  parent reply	other threads:[~2002-10-08 22:04 UTC|newest]

Thread overview: 32+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-10-07 19:30 [patch] IDE driver model update Patrick Mochel
2002-10-07 19:31 ` Patrick Mochel
2002-10-07 19:31 ` Patrick Mochel
2002-10-11 23:06   ` Pavel Machek
2002-10-07 19:31 ` Patrick Mochel
2002-10-07 22:42   ` Alexander Viro
2002-10-07 22:51     ` Patrick Mochel
2002-10-07 22:58       ` Alexander Viro
2002-10-07 23:06         ` Patrick Mochel
2002-10-08  2:17           ` Alexander Viro
2002-10-08 12:21             ` Alan Cox
2002-10-08 12:24               ` Alexander Viro
2002-10-08 13:05                 ` Alan Cox
2002-10-08 19:18                   ` Andries Brouwer
2002-10-08 13:25                 ` jbradford
2002-10-08 14:31                   ` Ketil Froyn
2002-10-08 21:34                     ` Xavier Bestel
2002-10-08 21:57                   ` Pavel Machek
2002-10-08 15:05                 ` Benjamin Herrenschmidt
2002-10-08 18:43             ` Patrick Mochel
2002-10-08 20:47               ` [RFC] embedded struct device " Alexander Viro
2002-10-08 21:29                 ` Linus Torvalds
2002-10-08 21:42                   ` Alexander Viro
2002-10-08 21:53                     ` Kai Germaschewski
2002-10-08 21:57                       ` Patrick Mochel
2002-10-08 22:51                         ` Alan Cox
2002-10-08 21:54                     ` Patrick Mochel
2002-10-08 22:12                     ` Linus Torvalds [this message]
2002-10-08 22:48                       ` Kai Germaschewski
2002-10-08 23:28                         ` Linus Torvalds
2002-10-08 22:29                     ` Greg KH
2002-10-08 21:30                 ` Greg KH

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=Pine.LNX.4.44.0210081510550.1226-100000@home.transmeta.com \
    --to=torvalds@transmeta.com \
    --cc=alan@lxorguk.ukuu.org.uk \
    --cc=andre@linux-ide.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mochel@osdl.org \
    --cc=viro@math.psu.edu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).