Re: [PATCH 01/17] locking/mutex: assert static storage for DEFINE_MUTEX()
From: sashiko-bot
Date: Mon Sep 14 2026 - 23:28:53 EST
> DEFINE_MUTEX() uses a static lock initializer whose lockdep class key
> requires a persistent object address. Reject automatic local declarations
> with ASSERT_STATIC_STORAGE(), in both the regular and PREEMPT_RT variants.
> Align the VMA and memblock tools stubs with the kernel declaration.
>
> The two automatic mutexes in the WireGuard allowedips selftests already
> call mutex_init(). Replace their redundant static initializers with plain
> struct mutex declarations.
>
> Assisted-by: OpenAI Codex
> Signed-off-by: Yury Norov <ynorov@xxxxxxxxxx>
Sashiko has reviewed this patch and found no issues. It looks great!
--
Sashiko AI review · https://sashiko.dev/#/patchset/20260915030336.1192299-1-ynorov@xxxxxxxxxx?part=1