Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 1461c5be authored by Fengguang Wu's avatar Fengguang Wu Committed by Greg Kroah-Hartman
Browse files

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.

Signed-off-by: default avatarFengguang Wu <fengguang.wu@intel.com>
Acked-by: default avatarRussell King <rmk+kernel@arm.linux.org.uk>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent a6b01ded
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -628,7 +628,7 @@ static void kobject_release(struct kref *kref)
{
	struct kobject *kobj = container_of(kref, struct kobject, kref);
#ifdef CONFIG_DEBUG_KOBJECT_RELEASE
	pr_debug("kobject: '%s' (%p): %s, parent %p (delayed)\n",
	pr_info("kobject: '%s' (%p): %s, parent %p (delayed)\n",
		 kobject_name(kobj), kobj, __func__, kobj->parent);
	INIT_DELAYED_WORK(&kobj->release, kobject_delayed_cleanup);
	schedule_delayed_work(&kobj->release, HZ);