Subject: Re: [PATCH] locking/mutex: Initialize mutex::magic even when LOCKDEP=n

From: Stephen Rothwell <[email-masked]>
Date: Fri, 28 Nov 2025 16:08:15 +1100

Hi all,

On Tue, 25 Nov 2025 06:54:21 -0800 Boqun Feng <[email-masked]> wrote:
>
> When DEBUG_MUTEXES=y and LOCKDEP=n, mutex_lock() still checks on
> ->magic, hence debug_mutex_init() should be called in  
> mutex_init_generic() as well. While we are at it, decouple LOCKDEP
> logic from debug_mutex_init(), because in this way debug_mutex_init()
> only needs one parameter, and we now have mutex_init_lockep() for
> LOCKDEP=y scenarios.
> 
> Reported-by: Stephen Rothwell <[email-masked]>
> Closes: https://lore.kernel.org/lkml/[email-masked]/
> Reported-by: Nathan Chancellor <[email-masked]>
> Closes: https://lore.kernel.org/lkml/20251121215819.GA1374726@ax162/
> Fixes: 3572e2edc7b6 ("locking/mutex: Redo __mutex_init()")
> Reviewed-by: Waiman Long <[email-masked]>
> Signed-off-by: Boqun Feng <[email-masked]>
> ---
> Peter,
> 
> Feel free to fold it into commit 3572e2edc7b6 ("locking/mutex: Redo
> __mutex_init()"), just resend it properly so it won't fall off your
> radar ;-)
> 
>  kernel/locking/mutex-debug.c | 10 +---------
>  kernel/locking/mutex.c       |  8 +++++++-
>  kernel/locking/mutex.h       |  5 ++---
>  3 files changed, 10 insertions(+), 13 deletions(-)

Any chance if this being applied?  I am still seeing the boot warning.

-- 
Cheers,
Stephen Rothwell