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:	Thu, 15 Jul 2010 10:22:18 -0700
From:	Greg KH <gregkh@...e.de>
To:	Russell King - ARM Linux <linux@....linux.org.uk>
Cc:	Conke Hu <conke.hu@...il.com>, CoffBeta <coffbeta@...il.com>,
	David Brownell <dbrownell@...rs.sourceforge.net>,
	inux kernel <linux-kernel@...r.kernel.org>,
	ext-jani.1.nikula@...ia.com,
	Uwe Kleine-K?nig <u.kleine-koenig@...gutronix.de>,
	Andrew Morton <akpm@...ux-foundation.org>,
	linux-arm-kernel@...ts.infradead.org
Subject: Re: tq 2440

On Thu, Jul 15, 2010 at 06:10:29PM +0100, Russell King - ARM Linux wrote:
> On Thu, Jul 15, 2010 at 09:51:41AM -0700, Greg KH wrote:
> > On Thu, Jul 15, 2010 at 05:35:26PM +0100, Russell King - ARM Linux wrote:
> > > On Thu, Jul 15, 2010 at 11:16:30PM +0800, Conke Hu wrote:
> > > > ever notice to the following kernel log?
> > > > "Device 's3c2440-nand' does not have a release() function, it is
> > > > broken and must."
> > > > release() function should be implemented  in the platform_device.
> > > 
> > > That's not telling you to provide a release function.  The warning is
> > > telling you that a device is being unregistered which doesn't have a
> > > release function.
> > > 
> > > Consider this point - maybe it doesn't have a release function because
> > > it's not supposed to be unregistered?
> > 
> > Heh, well, it is being unregistered, and at that point in time, the
> > kernel complains.
> 
> The unregistration occurs because platform_register_devices() (which is
> used by arch code to register a block of platform devices) undoes its
> work if one of the devices fails to register.
> 
> I've long since thought, since I created that function, that this probably
> isn't desirable behaviour, and it should continue to register as many
> devices as it possibly can.
> 
> > All kobjects need a release function that actually frees it.  If not,
> > that is a logic bug.  Please see the Documentation/kobject.txt file for
> > details.
> 
> How do you free a statically declared platform device?

You never unregister it :)

Otherwise, you will have problems with the reference counting logic, and
you should make it a dynamic device.  I really want to move to forcing
all devices to be created dynamically, but the platform devices are the
biggest static device users, so I've not been pushing it very hard, due
to other more pressing issues...

thanks,

greg k-h
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ