From: Eric W. Biederman Date: Wed, 4 Nov 2009 10:50:28 +0000 (-0800) Subject: Driver core: Don't remove kobjects in device_shutdown. X-Git-Tag: firefly_0821_release~9833^2~3894^2~17 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=18ef545e47c126abd87c013b762b5fbb574858ce;p=firefly-linux-kernel-4.4.55.git Driver core: Don't remove kobjects in device_shutdown. device_shutdown is defined to just shutdown the hardware and to not clean up any kernel data structures. Therefore don't put the kobjects for /sys/dev and /sys/dev/block and /sys/dev/char. This ensures we don't remove /sys/dev/block and /sys/dev/char while we still have symlinks from there to the actual devices. Acked-by: Kay Sievers Signed-off-by: Eric W. Biederman Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/base/core.c b/drivers/base/core.c index 0d3c29d72215..353b13782165 100644 --- a/drivers/base/core.c +++ b/drivers/base/core.c @@ -1730,8 +1730,5 @@ void device_shutdown(void) dev->driver->shutdown(dev); } } - kobject_put(sysfs_dev_char_kobj); - kobject_put(sysfs_dev_block_kobj); - kobject_put(dev_kobj); async_synchronize_full(); }