summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2020-04-09 12:46:25 +0100
committerChris Wilson <chris@chris-wilson.co.uk>2021-01-31 22:21:04 +0000
commit67dff0a7bdb0b8b0eab921675e61d02e8fab6b37 (patch)
tree973a87553a734dfd77281f19034b8032de5e6038
parente1a0452de227ed792fe295b03139bd2ec9fe5577 (diff)
HAX timer: Describe the delayed_work for a freed timer
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@chris-wilson.co.uk> Link: https://patchwork.freedesktop.org/patch/msgid/20200409114625.12251-1-chris@chris-wilson.co.uk
-rw-r--r--kernel/time/timer.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/kernel/time/timer.c b/kernel/time/timer.c
index 8dbc008f8942..8e51b1e7bb57 100644
--- a/kernel/time/timer.c
+++ b/kernel/time/timer.c
@@ -615,7 +615,14 @@ static const 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 (timer->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)