From: viro@parcelfarce.linux.theplanet.co.uk
To: Andrew Morton <akpm@digeo.com>
Cc: Pavel Machek <pavel@suse.cz>,
mochel@osdl.org, greg@kroah.com, hannal@us.ibm.com,
linux-kernel@vger.kernel.org
Subject: Re: [RFT/C 2.5.70] Input class hook up to driver model/sysfs
Date: Fri, 6 Jun 2003 00:41:50 +0100 [thread overview]
Message-ID: <20030605234150.GY6754@parcelfarce.linux.theplanet.co.uk> (raw)
In-Reply-To: <20030605155642.68179245.akpm@digeo.com>
On Thu, Jun 05, 2003 at 03:56:42PM -0700, Andrew Morton wrote:
> Al Viro has asked that sysfs conversions such as this be placed on hold
> until we sort through the newly-added bugs arising from the sysfsification
> of netdevs and request queues.
>
> So yeah, do the work, but please make sure that you understand what went
> wrong with netdevs and queues, and make sure that the input sysfsification
> addresses those problems. Preferably in the same way...
It doesn't - note the absense of ->release() in the introduced objects,
lack of refcount in current ones and chunks like
+ class_device_unregister(&dev->class_dev);
+ kfree(dev);
in the patch. The last one is obvious breakage, no matter what else is
going on - if ->class_dev is registered, it could be held by opened
sysfs file and we are doing kfree() of a busy object. If it is not,
unregister will be unhappy _and_ we still might have it held by opened
sysfs file since the time when it used to be registered.
IOW, before something like that we'd need to make lifetime rules
for evdev et.al. refcounting-based, make drivers/input/* OK with
zombies ("I want it gone, but sysfs holds it") and when that is
done - have freeing done from ->release() of kobject.
Note that things like evdev->open are _not_ immediately usable for
refcounts - the lifetime is controlled by combination of ->exist
and ->open and we do non-trivial work when current ->open hits
zero, so just adding offset to ->open won't do.
next prev parent reply other threads:[~2003-06-05 23:28 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-05-28 1:04 Hanna Linder
2003-05-28 23:11 ` Hanna Linder
2003-05-29 7:30 ` Greg KH
2003-05-29 9:30 ` Christoph Hellwig
2003-06-05 21:12 ` Pavel Machek
2003-06-05 21:17 ` Greg KH
2003-06-05 22:07 ` Pavel Machek
2003-06-05 22:12 ` Patrick Mochel
2003-06-05 22:45 ` Pavel Machek
2003-06-05 22:56 ` Andrew Morton
2003-06-05 23:41 ` viro [this message]
2003-06-06 0:03 ` Hanna Linder
2003-06-05 22:16 ` 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=20030605234150.GY6754@parcelfarce.linux.theplanet.co.uk \
--to=viro@parcelfarce.linux.theplanet.co.uk \
--cc=akpm@digeo.com \
--cc=greg@kroah.com \
--cc=hannal@us.ibm.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mochel@osdl.org \
--cc=pavel@suse.cz \
/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
all inboxes | Powered by JetHome®