diff options
| author | Thomas Zimmermann <tzimmermann@suse.de> | 2025-09-15 10:23:28 +0200 |
|---|---|---|
| committer | Thomas Zimmermann <tzimmermann@suse.de> | 2025-09-15 10:23:28 +0200 |
| commit | b4d90dbc4c1bc4bd3eb2d2989330af0eb95c98e8 (patch) | |
| tree | 5670a6d87e7cb5c421809babf9dc9e72ff40f8ae /kernel/locking/mutex-debug.c | |
| parent | 54d4f445517fe8350d735624d7f4225e7511d9eb (diff) | |
| parent | 0d9f0083f7a5a31d91d501467b499bb8c4b25bdf (diff) | |
Merge drm/drm-next into drm-misc-next-fixes
Backmerging to drm-misc-next-fixes to get features and fixes from
v6.17-rc6.
Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
Diffstat (limited to 'kernel/locking/mutex-debug.c')
| -rw-r--r-- | kernel/locking/mutex-debug.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/kernel/locking/mutex-debug.c b/kernel/locking/mutex-debug.c index 6e6f6071cfa2..949103fd8e9b 100644 --- a/kernel/locking/mutex-debug.c +++ b/kernel/locking/mutex-debug.c @@ -53,17 +53,18 @@ void debug_mutex_add_waiter(struct mutex *lock, struct mutex_waiter *waiter, { lockdep_assert_held(&lock->wait_lock); - /* Mark the current thread as blocked on the lock: */ - task->blocked_on = waiter; + /* Current thread can't be already blocked (since it's executing!) */ + DEBUG_LOCKS_WARN_ON(__get_task_blocked_on(task)); } void debug_mutex_remove_waiter(struct mutex *lock, struct mutex_waiter *waiter, struct task_struct *task) { + struct mutex *blocked_on = __get_task_blocked_on(task); + DEBUG_LOCKS_WARN_ON(list_empty(&waiter->list)); DEBUG_LOCKS_WARN_ON(waiter->task != task); - DEBUG_LOCKS_WARN_ON(task->blocked_on != waiter); - task->blocked_on = NULL; + DEBUG_LOCKS_WARN_ON(blocked_on && blocked_on != lock); INIT_LIST_HEAD(&waiter->list); waiter->task = NULL; |
