Skip to content

Commit e13e236

Browse files
thomashvmwIngo Molnar
authored andcommitted
locking/mutex: Fix mutex debug call and ww_mutex documentation
The following commit: 08295b3 ("Implement an algorithm choice for Wound-Wait mutexes") introduced a reference in the documentation to a function that was removed in an earlier commit. It also forgot to remove a call to debug_mutex_add_waiter() which is now unconditionally called by __mutex_add_waiter(). Fix those bugs. Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com> Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org> Cc: Linus Torvalds <torvalds@linux-foundation.org> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Thomas Gleixner <tglx@linutronix.de> Cc: dri-devel@lists.freedesktop.org Fixes: 08295b3 ("Implement an algorithm choice for Wound-Wait mutexes") Link: http://lkml.kernel.org/r/20180903140708.2401-1-thellstrom@vmware.com Signed-off-by: Ingo Molnar <mingo@kernel.org>
1 parent 11da3a7 commit e13e236

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

kernel/locking/mutex.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -389,7 +389,7 @@ static bool __ww_mutex_wound(struct mutex *lock,
389389
/*
390390
* wake_up_process() paired with set_current_state()
391391
* inserts sufficient barriers to make sure @owner either sees
392-
* it's wounded in __ww_mutex_lock_check_stamp() or has a
392+
* it's wounded in __ww_mutex_check_kill() or has a
393393
* wakeup pending to re-read the wounded state.
394394
*/
395395
if (owner != current)
@@ -946,7 +946,6 @@ __mutex_lock_common(struct mutex *lock, long state, unsigned int subclass,
946946
}
947947

948948
debug_mutex_lock_common(lock, &waiter);
949-
debug_mutex_add_waiter(lock, &waiter, current);
950949

951950
lock_contended(&lock->dep_map, ip);
952951

0 commit comments

Comments
 (0)