linux-stable/drivers/base
Eric W. Biederman 030c1d2bfc kobject: Fix kobject_rename and !CONFIG_SYSFS
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 <ebiederm@xmission.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-10-16 09:24:52 -07:00
..
power debug: use dev_WARN() rather than WARN_ON() in device_pm_add() 2008-10-16 09:24:50 -07:00
attribute_container.c SCSI: convert struct class_device to struct device 2008-04-19 19:10:33 -07:00
base.h driver-core: use klist for class device list and implement iterator 2008-10-09 08:56:04 +02:00
bus.c Driver core: make bus_find_device_by_name() more robust 2008-10-16 09:24:51 -07:00
class.c driver-core: use klist for class device list and implement iterator 2008-10-09 08:56:04 +02:00
core.c kobject: Fix kobject_rename and !CONFIG_SYSFS 2008-10-16 09:24:52 -07:00
cpu.c Merge branch 'cpus4096-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip 2008-07-23 18:37:44 -07:00
dd.c device model: Do a quickcheck for driver binding before doing an expensive check 2008-10-16 09:24:50 -07:00
devres.c Driver core: fix devres_release_all() return value 2007-07-11 16:09:02 -07:00
dma-mapping.c devres: device resource management 2007-02-09 17:39:36 -05:00
driver.c drivers/base/driver.c: remove unused to_dev() macro 2008-08-21 10:15:35 -07:00
firmware.c firmware: change firmware_kset to firmware_kobj 2008-01-24 20:40:23 -08:00
firmware_class.c firmware: use memory_read_from_buffer() 2008-07-25 10:53:44 -07:00
hypervisor.c kobject: convert /sys/hypervisor to use kobject_create 2008-01-24 20:40:15 -08:00
init.c Driver core: coding style fixes 2008-01-24 22:50:12 -08:00
isa.c isa: set 24-bit dma_mask for ISA devices 2008-07-26 12:00:02 -07:00
Kconfig always enable FW_LOADER unless EMBEDDED=y 2008-07-21 21:54:58 -07:00
Makefile Merge branch 'dmapool' of git://git.kernel.org/pub/scm/linux/kernel/git/willy/misc 2008-02-05 19:05:48 -08:00
map.c
memory.c more sysdev API change fallout - drivers/base/memory.c 2008-07-28 08:31:58 -07:00
module.c Driver core: move the static kobject out of struct driver 2008-01-24 20:40:35 -08:00
node.c sysdev: Pass the attribute to the low level sysdev show/store function 2008-07-21 21:55:02 -07:00
platform.c platform: add new device registration helper 2008-10-16 09:24:51 -07:00
sys.c Use WARN() in drivers/base/ 2008-07-26 12:00:07 -07:00
topology.c sysdev: Pass the attribute to the low level sysdev show/store function 2008-07-21 21:55:02 -07:00
transport_class.c SCSI: convert struct class_device to struct device 2008-04-19 19:10:33 -07:00