Skip to content

Commit

Permalink
HAX timer: Describe the delayed_work for a freed timer
Browse files Browse the repository at this point in the history
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 <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
Signed-off-by: Rodrigo Vivi <[email protected]>
  • Loading branch information
ickle authored and rodrigovivi committed Jun 17, 2021
1 parent dadb700 commit e0491bc
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion kernel/time/timer.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit e0491bc

Please sign in to comment.