Re: [PATCH] timer: silenct a lockdep splat with debugobjects

From: Peter Zijlstra
Date: Fri Mar 13 2020 - 16:13:26 EST


On Fri, Mar 13, 2020 at 03:32:52PM -0400, Qian Cai wrote:
> Well, in mm/vmstat.c (init_mm_internals) case for example, it was initialized
> as a static,
>
> static DECLARE_DEFERRABLE_WORK(shepherd, vmstat_shepherd);
>
> which will not call __debug_object_init().

Then fix that.

That is, all of:

DECLARE_DEFERRABLE_WORK
KTHREAD_DELAYED_WORK_INIT
DEFINE_TIMER

are broken and need to go.

Unless of course, you can frob debugobjects such that we can provide the
required storage through is_static_object() and modify the above static
declarators to provide the storage.

Or, fix that random crud to do the wakeup outside of the lock.

Plenty options..