Skip to content

Commit

Permalink
kobject: show debug info on delayed kobject release
Browse files Browse the repository at this point in the history
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: Fengguang Wu <[email protected]>
Acked-by: Russell King <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
  • Loading branch information
Fengguang Wu authored and gregkh committed Oct 11, 2013
1 parent a6b01de commit 1461c5b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/kobject.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 1461c5b

Please sign in to comment.