linux-stable/drivers
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
..
accessibility
acpi rtc-cmos: move wake setup from ACPI glue into RTC driver 2008-10-14 16:08:21 -07:00
amba
ata Merge commit 'origin' 2008-10-15 11:31:54 +11:00
atm Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/torvalds/linux-2.6 2008-10-11 12:39:35 -07:00
auxdisplay
base kobject: Fix kobject_rename and !CONFIG_SYSFS 2008-10-16 09:24:52 -07:00
block device create: block: convert device_create_drvdata to device_create 2008-10-16 09:24:41 -07:00
bluetooth Merge git://git.kernel.org/pub/scm/linux/kernel/git/brodo/pcmcia-2.6 2008-10-13 14:12:40 -07:00
cdrom gdrom: change to use __blk_end_request() 2008-10-09 08:56:21 +02:00
char device create: char: convert device_create_drvdata to device_create 2008-10-16 09:24:42 -07:00
clocksource
connector
cpufreq [CPUFREQ] Fix BUG: using smp_processor_id() in preemptible code 2008-10-09 13:52:44 -04:00
cpuidle
crypto
dca device create: misc: convert device_create_drvdata to device_create 2008-10-16 09:24:43 -07:00
dio
dma
edac
eisa
firewire
firmware drivers/firmware/iscsi_ibft.c: make 3 functions static 2008-10-16 09:24:48 -07:00
gpio
gpu
hid device create: misc: convert device_create_drvdata to device_create 2008-10-16 09:24:43 -07:00
hwmon device create: misc: convert device_create_drvdata to device_create 2008-10-16 09:24:43 -07:00
i2c device create: misc: convert device_create_drvdata to device_create 2008-10-16 09:24:43 -07:00
ide device create: ide: convert device_create_drvdata to device_create 2008-10-16 09:24:45 -07:00
ieee1394 device create: ieee1394: convert device_create_drvdata to device_create 2008-10-16 09:24:42 -07:00
infiniband device create: infiniband: convert device_create_drvdata to device_create 2008-10-16 09:24:42 -07:00
input Merge commit 'origin' 2008-10-15 11:31:54 +11:00
isdn device create: misc: convert device_create_drvdata to device_create 2008-10-16 09:24:43 -07:00
leds device create: misc: convert device_create_drvdata to device_create 2008-10-16 09:24:43 -07:00
lguest
macintosh device create: misc: convert device_create_drvdata to device_create 2008-10-16 09:24:43 -07:00
mca
md raid, fastboot: hide RAID autodetect option if MD is compiled as a module 2008-10-12 08:25:14 -07:00
media device create: misc: convert device_create_drvdata to device_create 2008-10-16 09:24:43 -07:00
memstick memstick: change to use __blk_end_request() 2008-10-09 08:56:20 +02:00
message
mfd mfd: Fix warning in WM8350 2008-10-13 21:51:57 +01:00
misc device create: misc: convert device_create_drvdata to device_create 2008-10-16 09:24:43 -07:00
mmc Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6 2008-10-13 17:13:56 +01:00
mtd device create: misc: convert device_create_drvdata to device_create 2008-10-16 09:24:43 -07:00
net device create: net: convert device_create_drvdata to device_create 2008-10-16 09:24:43 -07:00
nubus
of Merge commit 'gcl/gcl-next' 2008-10-14 10:11:27 +11:00
oprofile Merge branch 'linus' into oprofile-v2 2008-10-13 11:05:51 +02:00
parisc
parport Merge git://git.kernel.org/pub/scm/linux/kernel/git/brodo/pcmcia-2.6 2008-10-13 14:12:40 -07:00
pci Merge commit 'origin' 2008-10-15 11:31:54 +11:00
pcmcia Merge git://git.kernel.org/pub/scm/linux/kernel/git/brodo/pcmcia-2.6 2008-10-13 14:12:40 -07:00
pnp PNP: create device attributes via default device attributes 2008-10-16 09:24:51 -07:00
power device create: misc: convert device_create_drvdata to device_create 2008-10-16 09:24:43 -07:00
ps3
rapidio
regulator da903x: add regulator support for DA9030/DA9034 2008-10-13 21:51:57 +01:00
rtc RTC: M48T35: new RTC driver 2008-10-15 12:46:51 +01:00
s390 device create: s390: convert device_create_drvdata to device_create 2008-10-16 09:24:44 -07:00
sbus
scsi device create: scsi: convert device_create_drvdata to device_create 2008-10-16 09:24:44 -07:00
serial Merge commit 'origin' 2008-10-15 11:31:54 +11:00
sh
sn
spi device create: misc: convert device_create_drvdata to device_create 2008-10-16 09:24:43 -07:00
ssb Merge git://git.kernel.org/pub/scm/linux/kernel/git/brodo/pcmcia-2.6 2008-10-13 14:12:40 -07:00
tc
telephony
thermal
uio device create: misc: convert device_create_drvdata to device_create 2008-10-16 09:24:43 -07:00
usb usb: turn dev_warn+WARN_ON combos into dev_WARN 2008-10-16 09:24:50 -07:00
video device create: video: convert device_create_drvdata to device_create 2008-10-16 09:24:45 -07:00
virtio
w1
watchdog Merge git://git.kernel.org/pub/scm/linux/kernel/git/wim/linux-2.6-watchdog 2008-10-12 11:51:32 -07:00
xen
zorro
Kconfig
Makefile