lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [day] [month] [year] [list]
Message-ID: <78676863-593f-4823-9dc2-c08a36f86378@redhat.com>
Date: Sun, 28 Sep 2025 12:37:32 -0400
From: Waiman Long <llong@...hat.com>
To: buckzhang1212 <buckzhang1212@...h.net>,
 "llong@...hat.com" <llong@...hat.com>
Cc: "peterz@...radead.org" <peterz@...radead.org>,
 "mingo@...hat.com" <mingo@...hat.com>, "will@...nel.org" <will@...nel.org>,
 "boqun.feng@...il.com" <boqun.feng@...il.com>,
 linux-kernel@...r.kernel…
 <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] locking/mutex: add MUTEX_WARN_ON to warn invalid mutex

On 9/28/25 12:24 PM, buckzhang1212 wrote:
> Hey Long
> you are right,lock->magic check can  help me to get what I want .
> It's a bit late for me, and I want to get the  warning when I first 
> use  the invalid mutex.
> Can I move the lock->magic check to  the mutex_lock?

All the mutex_lock*() functions will eventually call 
__mutex_lock_common() or __mutex_trylock_fast() which also has the check 
. There is no need to duplicate the check in each of them.

Cheers,
Longman


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ