Message ID | 20200409114625.12251-1-chris@chris-wilson.co.uk (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | HAX timer: Describe the delayed_work for a freed timer | expand |
diff --git a/kernel/time/timer.c b/kernel/time/timer.c index 4820823515e9..262eea5abb86 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 (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)
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> --- kernel/time/timer.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-)