Skip to content

Commit 18ef545

Browse files
ebiedermgregkh
authored andcommitted
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 <kay.sievers@vrfy.org> Signed-off-by: Eric W. Biederman <ebiederm@aristanetworks.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
1 parent 9ebfbd4 commit 18ef545

1 file changed

Lines changed: 0 additions & 3 deletions

File tree

‎drivers/base/core.c‎

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1730,8 +1730,5 @@ void device_shutdown(void)
17301730
dev->driver->shutdown(dev);
17311731
}
17321732
}
1733-
kobject_put(sysfs_dev_char_kobj);
1734-
kobject_put(sysfs_dev_block_kobj);
1735-
kobject_put(dev_kobj);
17361733
async_synchronize_full();
17371734
}

0 commit comments

Comments
 (0)