From: Kay Sievers <kay.sievers@vrfy.org>
To: Jiri Kosina <jkosina@suse.cz>
Cc: Greg KH <greg@kroah.com>,
Dmitry Torokhov <dmitry.torokhov@gmail.com>,
Linus Torvalds <torvalds@linux-foundation.org>,
Bj?rn Steinbrink <B.Steinbrink@gmx.de>,
Arjan van de Ven <arjan@linux.intel.com>,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
Johannes Berg <johannes@sipsolutions.net>
Subject: Re: [PATCH] evdev: Release eventual input device grabs when getting disconnected
Date: Tue, 01 Apr 2008 00:46:07 +0200 [thread overview]
Message-ID: <1207003567.20492.52.camel@lov.site> (raw)
In-Reply-To: <Pine.LNX.4.64.0803312326130.5541@jikos.suse.cz>
On Mon, 2008-03-31 at 23:27 +0200, Jiri Kosina wrote:
> On Mon, 31 Mar 2008, Greg KH wrote:
>
> > > Greg, please look at the change again. Before kobject_put(kobj->parent)
> > > was done in kobject_cleanup() and so the parent would only be freed when
> > > all its children are gone. Now parent is deleted early, even if its
> > > children are still referenced by other users. This is lifetime rule
> > > change and should really be announced as such.
> > Ugh, this was done because of scsi, they required that if you really
> > were deleting the parent, you wanted it gone.
>
> What is the exact meaning of "gone" here please?
Gone means, that if you remove a device from sysfs, you drop the
implicit reference to the parent device, as this is no longer needed.
You are expected to keep a ref to the parent object (same way as to any
other used object) if you need to access the data. Removed objects are
isolated now, which means that you just pin their data and not their
parents.
This is the expected behavior and makes it possible to resolve refcount
loops (parent ref's child) which could not be released with the implicit
parent ref that was only released on object cleanup.
Thanks,
Kay
next prev parent reply other threads:[~2008-03-31 22:41 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-03-30 18:42 [PATCH] evdev: Release eventual input device grabs when getting disconnected Björn Steinbrink
2008-03-30 21:51 ` Linus Torvalds
2008-03-30 22:22 ` Greg KH
2008-03-30 22:35 ` Linus Torvalds
2008-03-30 22:42 ` Björn Steinbrink
2008-03-30 23:19 ` Arjan van de Ven
2008-03-31 20:46 ` Dmitry Torokhov
2008-03-31 6:15 ` Dmitry Torokhov
2008-03-31 17:28 ` Greg KH
2008-03-31 18:01 ` Dmitry Torokhov
2008-03-31 18:24 ` Linus Torvalds
2008-03-31 23:12 ` Benjamin Herrenschmidt
2008-03-31 23:51 ` Greg KH
2008-04-01 1:01 ` Benjamin Herrenschmidt
2008-03-31 20:42 ` Greg KH
2008-03-31 20:57 ` Dmitry Torokhov
2008-03-31 22:09 ` Greg KH
2008-04-01 3:30 ` Dmitry Torokhov
2008-03-31 21:27 ` Jiri Kosina
2008-03-31 22:46 ` Kay Sievers [this message]
2008-03-31 20:21 ` Johannes Berg
2008-03-31 19:05 ` Björn Steinbrink
2008-04-01 11:51 ` Johannes Berg
2008-04-01 15:20 ` Björn Steinbrink
2008-04-02 9:17 ` Johannes Berg
2008-03-31 21:02 ` Johannes Berg
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=1207003567.20492.52.camel@lov.site \
--to=kay.sievers@vrfy.org \
--cc=B.Steinbrink@gmx.de \
--cc=arjan@linux.intel.com \
--cc=dmitry.torokhov@gmail.com \
--cc=greg@kroah.com \
--cc=jkosina@suse.cz \
--cc=johannes@sipsolutions.net \
--cc=linux-kernel@vger.kernel.org \
--cc=torvalds@linux-foundation.org \
/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