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, 28 Nov 2007 16:52:05 +0100
From:	Cornelia Huck <cornelia.huck@...ibm.com>
To:	Kay Sievers <kay.sievers@...y.org>
Cc:	Greg KH <greg@...ah.com>, linux-kernel@...r.kernel.org,
	Alan Stern <stern@...land.harvard.edu>,
	Jonathan Corbet <corbet@....net>,
	Randy Dunlap <randy.dunlap@...cle.com>
Subject: Re: [RFC] New kobject/kset/ktype documentation and example code

On Wed, 28 Nov 2007 13:35:54 +0100,
Kay Sievers <kay.sievers@...y.org> wrote:

> On Wed, 2007-11-28 at 10:01 +0100, Cornelia Huck wrote:
> > On Tue, 27 Nov 2007 15:02:52 -0800, Greg KH <greg@...ah.com> wrote:
> 
> > > Among other things, kobject_init() sets the kobject's reference count to
> > > one.  Calling kobject_init() is not sufficient, however. Kobject users
> > > must, at a minimum, set the name of the kobject; this is the name that will
> > > be used in sysfs entries. 
> > 
> > Unless they don't register their kobject. (But they should always set a
> > name anyway to avoid funny debug messages, so it is probably a good
> > idea to call this a "must").
> 
> Yeah, we should require it. And kobject_cleanup() needs to be called to
> free the allocated name, if the object is not already added and needs to
> be deleted (common in rewinding on error).

Always using kobject_put() should take care of that.

> 
> Btw, do you have a good example for unregistered/unnamed kobjects?

Unfortunately not (I can only think of devices that might never be
registered).
-
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