[Intel-gfx] [PATCH] HAX timer: Describe the delayed_work for a freed timer
Chris Wilson
chris at chris-wilson.co.uk
Thu Apr 9 09:09:53 UTC 2020
Improve upon the
<3> [310.437368] ODEBUG: free active (active state 0) object type: timer_list hint: delayed_work_timer_fn+0x0/0x10
by describing what delayed_work was queued instead.
Signed-off-by: Chris Wilson <chris at chris-wilson.co.uk>
---
kernel/time/timer.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/kernel/time/timer.c b/kernel/time/timer.c
index 4820823515e9..f637a815d91c 100644
--- a/kernel/time/timer.c
+++ b/kernel/time/timer.c
@@ -602,7 +602,14 @@ static struct debug_obj_descr timer_debug_descr;
static void *timer_debug_hint(void *addr)
{
- return ((struct timer_list *) addr)->function;
+ struct timer_list *timer = addr;
+
+ if (addr->function == delayed_work_timer_fn) {
+ struct delayed_work *work = from_timer(work, timer, timer);
+ return work->work.func;
+ }
+
+ return timer->function;
}
static bool timer_is_static_object(void *addr)
--
2.20.1
More information about the Intel-gfx
mailing list