Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

kobject: show debug info on delayed kobject release

Useful for locating buggy drivers on kernel oops.

It may add dozens of new lines to boot dmesg. DEBUG_KOBJECT_RELEASE is
hopefully only enabled in debug kernels (like maybe the Fedora rawhide
one, or at developers), so being a bit more verbose is likely ok.

Acked-by: Russell King <rmk+kernel@arm.linux.org.uk>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Fengguang Wu <fengguang.wu@intel.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>

authored by

Fengguang Wu and committed by
Linus Torvalds
0ff18e37 f715729e

+1 -1
+1 -1
lib/kobject.c
··· 592 592 { 593 593 struct kobject *kobj = container_of(kref, struct kobject, kref); 594 594 #ifdef CONFIG_DEBUG_KOBJECT_RELEASE 595 - pr_debug("kobject: '%s' (%p): %s, parent %p (delayed)\n", 595 + pr_info("kobject: '%s' (%p): %s, parent %p (delayed)\n", 596 596 kobject_name(kobj), kobj, __func__, kobj->parent); 597 597 INIT_DELAYED_WORK(&kobj->release, kobject_delayed_cleanup); 598 598 schedule_delayed_work(&kobj->release, HZ);