lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Wed, 18 Oct 2017 12:01:09 +0200
From:   "Rafael J. Wysocki" <rjw@...ysocki.net>
To:     Mark Brown <broonie@...nel.org>
Cc:     Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
        Jeffy Chen <jeffy.chen@...k-chips.com>,
        linux-kernel@...r.kernel.org, dmitry.torokhov@...il.com,
        heiko@...ech.de, briannorris@...omium.org, dianders@...omium.org,
        tfiga@...omium.org, seanpaul@...omium.org, thierry.reding@...il.com
Subject: Re: [PATCH] driver core: Make sure device detached from driver before deleting it

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. :-)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ