From: "Rafael J. Wysocki" <rjw@rjwysocki.net>
To: Mark Brown <broonie@kernel.org>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
Jeffy Chen <jeffy.chen@rock-chips.com>,
linux-kernel@vger.kernel.org, dmitry.torokhov@gmail.com,
heiko@sntech.de, briannorris@chromium.org, dianders@chromium.org,
tfiga@chromium.org, seanpaul@chromium.org,
thierry.reding@gmail.com
Subject: Re: [PATCH] driver core: Make sure device detached from driver before deleting it
Date: Wed, 18 Oct 2017 12:01:09 +0200 [thread overview]
Message-ID: <2372472.Y1TOlSNE40@aspire.rjw.lan> (raw)
In-Reply-To: <20171018094721.s56qkx4m7gswvpc3@sirena.co.uk>
On Wednesday, October 18, 2017 11:47:21 AM CEST Mark Brown wrote:
>
> --3mkxuqf5z23bfztf
> Content-Type: text/plain; charset=us-ascii
> Content-Disposition: inline
>
> On Wed, Oct 18, 2017 at 08:19:52AM +0200, Greg Kroah-Hartman wrote:
> > On Wed, Oct 18, 2017 at 01:49:26PM +0800, Jeffy Chen wrote:
> > > There are cases we call device_del() without detaching it from the
> > > driver(e.g. spi core del children devices).
>
> > Why would you do that? Shouldn't that be fixed instead of this odd
> > work-around for a broken bus?
>
> Not that I ever looked at that bit of the SPI stack before but this
> feels like an interface bug in the driver core, it's really surprising
> that unregistering a device doesn't clean it up. That's what other
> unregister interfaces do. If this is buggy it looks like the platform
> bus will also be buggy, it's just doing a del and a put (plus some stuff
> to free resources) which is all device_unregster() does.
device_del() calls bus_remove_device() which then calls
device_release_driver() eventually.
So there is something going wrong, but that's not a missing
device_release_driver() call. :-)
next prev parent reply other threads:[~2017-10-18 10:10 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-10-18 5:49 Jeffy Chen
2017-10-18 6:19 ` Greg Kroah-Hartman
2017-10-18 7:06 ` jeffy
2017-10-18 7:33 ` Greg Kroah-Hartman
2017-10-18 8:32 ` jeffy
2017-10-18 9:47 ` Mark Brown
2017-10-18 10:01 ` Rafael J. Wysocki [this message]
2017-10-18 10:04 ` Rafael J. Wysocki
2017-10-18 11:11 ` jeffy
2017-10-18 11:32 ` jeffy
2017-10-18 11:32 ` Rafael J. Wysocki
2017-10-18 11:33 ` Rafael J. Wysocki
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=2372472.Y1TOlSNE40@aspire.rjw.lan \
--to=rjw@rjwysocki.net \
--cc=briannorris@chromium.org \
--cc=broonie@kernel.org \
--cc=dianders@chromium.org \
--cc=dmitry.torokhov@gmail.com \
--cc=gregkh@linuxfoundation.org \
--cc=heiko@sntech.de \
--cc=jeffy.chen@rock-chips.com \
--cc=linux-kernel@vger.kernel.org \
--cc=seanpaul@chromium.org \
--cc=tfiga@chromium.org \
--cc=thierry.reding@gmail.com \
/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®