Thread (28 messages) 28 messages, 7 authors, 7d ago

Re: [PATCH 12/17] timers: assert static storage for DEFINE_TIMER()

flat view

From: Thomas Gleixner <tglx@kernel.org>
Date: 2026-09-29 18:50:18
Also in: linux-fsdevel, linux-mm, linux-rt-devel, linuxppc-dev, lkml, llvm, rcu, virtualization

On Mon, Sep 14 2026 at 23:13, Yury Norov wrote:
DEFINE_TIMER() marks a timer as statically initialized for debugobjects.
An automatic local timer instead needs timer_setup_on_stack() and the
corresponding on-stack destruction before leaving scope.

Add ASSERT_STATIC_STORAGE() to catch automatic declarations at compile
time. The timer lockdep key is already static; this check enforces the
debugobjects storage contract. Leave __TIMER_INITIALIZER() unchanged.

Assisted-by: OpenAI Codex
Signed-off-by: Yury Norov <redacted>
Reviewed-by: Thomas Gleixner <tglx@kernel.org>
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help