Re: [PATCH v5 06/36] cleanup: Basic compatibility with context analysis
From: Tetsuo Handa
Date: Tue Jan 06 2026 - 08:24:00 EST
On 2025/12/20 0:39, Marco Elver wrote:
> Introduce basic compatibility with cleanup.h infrastructure.
Can Compiler-Based Context- and Locking-Analysis work with conditional guards
(unlock only if lock succeeded) ?
I consider that replacing mutex_lock() with mutex_lock_killable() helps reducing
frequency of hung tasks under heavy load where many processes are preempted waiting
for the same mutex to become available (e.g.
https://syzkaller.appspot.com/bug?extid=8f41dccfb6c03cc36fd6 ).
But e.g. commit f49573f2f53e ("tty: use lock guard()s in tty_io") already replaced
plain mutex_lock()/mutex_unlock() with plain guard(mutex). If I propose a patch for
replacing mutex_lock() with mutex_lock_killable(), can I use conditional guards?
(Would be yes if Compiler-Based Context- and Locking-Analysis can work, would be no
if Compiler-Based Context- and Locking-Analysis cannot work) ?