Re: [PATCH 08/17] idr: enforce the static-storage contract of DEFINE_IDR()
From: sashiko-bot
Date: Mon Sep 14 2026 - 23:29:04 EST
> DEFINE_IDR() is documented as defining a statically allocated IDR. Enforce
> that contract with ASSERT_STATIC_STORAGE(), matching DEFINE_IDA().
>
> Normal IDR operations use external synchronization and do not acquire the
> embedded XArray lock. This change enforces the declaration API contract;
> it does not fix a lockdep failure in ordinary IDR operations.
>
> Convert the seven automatic IDRs in the userspace tests to plain
> declarations and runtime initialization. Two already use idr_init_base().
> Keep direct IDR_INIT() and IDR_INIT_BASE() initializers unchanged.
>
> 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=8