<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/lib/kobject.c, branch v2.6.32</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/
</subtitle>
<id>https://git.shady.money/linux/atom?h=v2.6.32</id>
<link rel='self' href='https://git.shady.money/linux/atom?h=v2.6.32'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/'/>
<updated>2009-06-16T04:30:24Z</updated>
<entry>
<title>kobject: make kset_create check kobject_set_name return value</title>
<updated>2009-06-16T04:30:24Z</updated>
<author>
<name>Dave Young</name>
<email>hidave.darkstar@gmail.com</email>
</author>
<published>2009-05-11T06:17:45Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=d9cd8f37855b012757818f31390e8f84db251c89'/>
<id>urn:sha1:d9cd8f37855b012757818f31390e8f84db251c89</id>
<content type='text'>
kset_create should check the kobject_set_name return value.

Add the return value checking code.

Signed-off-by: Dave Young &lt;hidave.darkstar@gmail.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;

</content>
</entry>
<entry>
<title>driver: dont update dev_name via device_add path</title>
<updated>2009-04-20T15:12:58Z</updated>
<author>
<name>Kay Sievers</name>
<email>kay.sievers@vrfy.org</email>
</author>
<published>2009-04-18T22:05:45Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=8a577ffc75d9194fe8cdb7479236f2081c26ca1f'/>
<id>urn:sha1:8a577ffc75d9194fe8cdb7479236f2081c26ca1f</id>
<content type='text'>
notice one system /proc/iomem some entries missed the name for pci_devices

it turns that dev-&gt;dev.kobj name is changed after device_add.

for pci code: via acpi_pci_root_driver.ops.add (aka acpi_pci_root_add)
==&gt; pci_acpi_scan_root is used to scan pci bus/device, and at the same
time we read the resource for pci_dev in the pci_read_bases, we have
res-&gt;name = pci_name(pci_dev); pci_name is calling dev_name.

later via acpi_pci_root_driver.ops.start (aka acpi_pci_root_start) ==&gt;
pci_bus_add_device to add all pci_dev in kobj tree.  pci_bus_add_device
will call device_add.

actually in device_add

        /* first, register with generic layer. */
        error = kobject_add(&amp;dev-&gt;kobj, dev-&gt;kobj.parent, "%s", dev_name(dev));
        if (error)
                goto Error;

will get one new name for that kobj, old name is freed.

[Impact: fix corrupted names in /proc/iomem ]

Signed-off-by: Yinghai Lu &lt;yinghai@kernel.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>driver core: get rid of struct device's bus_id string array</title>
<updated>2009-03-24T23:38:23Z</updated>
<author>
<name>Kay Sievers</name>
<email>kay.sievers@vrfy.org</email>
</author>
<published>2009-01-25T14:17:37Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=1fa5ae857bb14f6046205171d98506d8112dd74e'/>
<id>urn:sha1:1fa5ae857bb14f6046205171d98506d8112dd74e</id>
<content type='text'>
Now that all users of bus_id is gone, we can remove it from struct
device.

Signed-off-by: Kay Sievers &lt;kay.sievers@vrfy.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;

</content>
</entry>
<entry>
<title>kobject: Cleanup kobject_rename and !CONFIG_SYSFS</title>
<updated>2008-10-16T16:24:52Z</updated>
<author>
<name>Eric W. Biederman</name>
<email>ebiederm@xmission.com</email>
</author>
<published>2008-07-04T01:05:28Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=0b4a4fea253e1296222603ccc55430ed7cd9413a'/>
<id>urn:sha1:0b4a4fea253e1296222603ccc55430ed7cd9413a</id>
<content type='text'>
It finally dawned on me what the clean fix to sysfs_rename_dir
calling kobject_set_name is.  Move the work into kobject_rename
where it belongs.  The callers serialize us anyway so this is
safe.

Signed-off-by: Eric W. Biederman &lt;ebiederm@xmission.com&gt;
Acked-by: Tejun Heo &lt;tj@kernel.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;

</content>
</entry>
<entry>
<title>kobject: Fix kobject_rename and !CONFIG_SYSFS</title>
<updated>2008-10-16T16:24:52Z</updated>
<author>
<name>Eric W. Biederman</name>
<email>ebiederm@xmission.com</email>
</author>
<published>2008-05-08T21:41:00Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=030c1d2bfcc2187650fb975456ca0b61a5bb77f4'/>
<id>urn:sha1:030c1d2bfcc2187650fb975456ca0b61a5bb77f4</id>
<content type='text'>
When looking at kobject_rename I found two bugs with
that exist when sysfs support is disabled in the kernel.

kobject_rename does not change the name on the kobject when
sysfs support is not compiled in.

kobject_rename without locking attempts to check the
validity of a rename operation, which the kobject layer
simply does not have the infrastructure to do.

This patch documents the previously unstated requirement of
kobject_rename that is the responsibility of the caller to
provide mutual exclusion and to be certain that the new_name
for the kobject is valid.

This patch modifies sysfs_rename_dir in !CONFIG_SYSFS case
to call kobject_set_name to actually change the kobject_name.

This patch removes the bogus and misleading check in kobject_rename
that attempts to see if a rename is valid.  The check is bogus
because we do not have the proper locking.  The check is misleading
because it looks like we can and do perform checking at the kobject
level that we don't.

Signed-off-by: Eric W. Biederman &lt;ebiederm@xmission.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;

</content>
</entry>
<entry>
<title>kobject: Replace ALL occurrences of '/' with '!' instead of only the first one.</title>
<updated>2008-08-21T17:15:34Z</updated>
<author>
<name>Ingo Oeser</name>
<email>ioe-lkml@rameria.de</email>
</author>
<published>2008-07-22T23:25:01Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=25fdeb3f4468595ab2885687b13515fa848731c2'/>
<id>urn:sha1:25fdeb3f4468595ab2885687b13515fa848731c2</id>
<content type='text'>
A recent patch from Kay Sievers &lt;kay.sievers@vrfy.org&gt;
replaced the first occurrence of '/' with '!' as needed for block devices.

Now do some cheap defensive coding and replace all of them to avoid future
issues in this area.

Signed-off-by: Ingo Oeser &lt;ioe-lkml@rameria.de&gt;
Cc: Kay Sievers &lt;kay.sievers@vrfy.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;

</content>
</entry>
<entry>
<title>Example use of WARN()</title>
<updated>2008-07-25T17:53:29Z</updated>
<author>
<name>Arjan van de Ven</name>
<email>arjan@linux.intel.com</email>
</author>
<published>2008-07-25T08:45:55Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=d955c78ac4699ac9c3fe07be62982cda13d13267'/>
<id>urn:sha1:d955c78ac4699ac9c3fe07be62982cda13d13267</id>
<content type='text'>
Now that WARN() exists, we can fold some of the printk's into it.

Signed-off-by: Arjan van de Ven &lt;arjan@linux.intel.com&gt;
Cc: Greg KH &lt;greg@kroah.com&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>kobject: replace '/' with '!' in name</title>
<updated>2008-07-22T04:54:40Z</updated>
<author>
<name>Kay Sievers</name>
<email>kay.sievers@vrfy.org</email>
</author>
<published>2008-05-06T20:24:04Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=9f255651fb41c111ee35a2ae632df8ce9bd61def'/>
<id>urn:sha1:9f255651fb41c111ee35a2ae632df8ce9bd61def</id>
<content type='text'>
Some (block) devices have a '/' in the name, and need special
handling. Let's have that rule to the core, so we can remove it
from the block class.

Signed-off-by: Kay Sievers &lt;kay.sievers@vrfy.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;

</content>
</entry>
<entry>
<title>PCI: ACPI PCI slot detection driver</title>
<updated>2008-06-10T21:37:14Z</updated>
<author>
<name>Alex Chiang</name>
<email>achiang@hp.com</email>
</author>
<published>2008-06-10T21:30:42Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=8344b568f5bdc7ee1bba909de3294c6348c36056'/>
<id>urn:sha1:8344b568f5bdc7ee1bba909de3294c6348c36056</id>
<content type='text'>
Detect all physical PCI slots as described by ACPI, and create entries in
/sys/bus/pci/slots/.

Not all physical slots are hotpluggable, and the acpiphp module does not
detect them.  Now we know the physical PCI geography of our system, without
caring about hotplug.

[kaneshige.kenji@jp.fujitsu.com: export-kobject_rename-for-pci_hotplug_core]
Signed-off-by: Kenji Kaneshige &lt;kaneshige.kenji@jp.fujitsu.com&gt;
Acked-by: Greg KH &lt;greg@kroah.com&gt;
[akpm@linux-foundation.org: build fix]
[akpm@linux-foundation.org: fix build with CONFIG_DMI=n]
Signed-off-by: Alex Chiang &lt;achiang@hp.com&gt;
Cc: Greg KH &lt;greg@kroah.com&gt;
Cc: Kristen Carlson Accardi &lt;kristen.c.accardi@intel.com&gt;
Cc: Len Brown &lt;lenb@kernel.org&gt;
Acked-by: Len Brown &lt;len.brown@intel.com&gt;
Acked-by: Kenji Kaneshige &lt;kaneshige.kenji@jp.fujitsu.com&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Jesse Barnes &lt;jbarnes@virtuousgeek.org&gt;
</content>
</entry>
<entry>
<title>kobject: do not copy vargs, just pass them around</title>
<updated>2008-04-30T23:52:48Z</updated>
<author>
<name>Kay Sievers</name>
<email>kay.sievers@vrfy.org</email>
</author>
<published>2008-04-30T00:06:29Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=a4ca6617421188f50774780cdc91c3782b7d08fe'/>
<id>urn:sha1:a4ca6617421188f50774780cdc91c3782b7d08fe</id>
<content type='text'>
This prevents a few unneeded copies.

Signed-off-by: Kay Sievers &lt;kay.sievers@vrfy.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;

</content>
</entry>
</feed>
