diff options
| author | Peter Zijlstra <peterz@infradead.org> | 2026-01-20 10:06:08 +0100 |
|---|---|---|
| committer | Peter Zijlstra <peterz@infradead.org> | 2026-03-08 11:06:53 +0100 |
| commit | 5c4326231cde36fd5e90c41e403df9fac6238f4b (patch) | |
| tree | e6b52954c69c230674f5e1f2a423d2d248fb65a8 /include/linux | |
| parent | 07574b8ebaac7927e2355b4f343b03b50e04494c (diff) | |
locking/mutex: Add context analysis
Add compiler context analysis annotations.
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Link: https://patch.msgid.link/20260121111213.745353747@infradead.org
Diffstat (limited to 'include/linux')
| -rw-r--r-- | include/linux/mutex.h | 2 | ||||
| -rw-r--r-- | include/linux/mutex_types.h | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/include/linux/mutex.h b/include/linux/mutex.h index c471b129f703..734048c02f4f 100644 --- a/include/linux/mutex.h +++ b/include/linux/mutex.h @@ -183,7 +183,7 @@ static inline int __must_check __devm_mutex_init(struct device *dev, struct mute */ #ifdef CONFIG_DEBUG_LOCK_ALLOC extern void mutex_lock_nested(struct mutex *lock, unsigned int subclass) __acquires(lock); -extern void _mutex_lock_nest_lock(struct mutex *lock, struct lockdep_map *nest_lock); +extern void _mutex_lock_nest_lock(struct mutex *lock, struct lockdep_map *nest_lock) __acquires(lock); extern int __must_check mutex_lock_interruptible_nested(struct mutex *lock, unsigned int subclass) __cond_acquires(0, lock); extern int __must_check _mutex_lock_killable(struct mutex *lock, diff --git a/include/linux/mutex_types.h b/include/linux/mutex_types.h index a8f119f81177..24ed599fdda8 100644 --- a/include/linux/mutex_types.h +++ b/include/linux/mutex_types.h @@ -44,7 +44,7 @@ context_lock_struct(mutex) { #ifdef CONFIG_MUTEX_SPIN_ON_OWNER struct optimistic_spin_queue osq; /* Spinner MCS lock */ #endif - struct mutex_waiter *first_waiter; + struct mutex_waiter *first_waiter __guarded_by(&wait_lock); #ifdef CONFIG_DEBUG_MUTEXES void *magic; #endif |
