diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2014-03-31 13:59:39 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2014-03-31 13:59:39 -0400 |
commit | 462bf234a82ae1ae9d7628f59bc81022591e1348 (patch) | |
tree | f75eea7864ae7c72c0757d5d090e38f757b5cb2d /kernel/locking/mutex-debug.c | |
parent | 455c6fdbd219161bd09b1165f11699d6d73de11c (diff) | |
parent | 6f008e72cd111a119b5d8de8c5438d892aae99eb (diff) |
Merge branch 'core-locking-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
Pull core locking updates from Ingo Molnar:
"The biggest change is the MCS spinlock generalization changes from Tim
Chen, Peter Zijlstra, Jason Low et al. There's also lockdep
fixes/enhancements from Oleg Nesterov, in particular a false negative
fix related to lockdep_set_novalidate_class() usage"
* 'core-locking-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (22 commits)
locking/mutex: Fix debug checks
locking/mutexes: Add extra reschedule point
locking/mutexes: Introduce cancelable MCS lock for adaptive spinning
locking/mutexes: Unlock the mutex without the wait_lock
locking/mutexes: Modify the way optimistic spinners are queued
locking/mutexes: Return false if task need_resched() in mutex_can_spin_on_owner()
locking: Move mcs_spinlock.h into kernel/locking/
m68k: Skip futex_atomic_cmpxchg_inatomic() test
futex: Allow architectures to skip futex_atomic_cmpxchg_inatomic() test
Revert "sched/wait: Suppress Sparse 'variable shadowing' warning"
lockdep: Change lockdep_set_novalidate_class() to use _and_name
lockdep: Change mark_held_locks() to check hlock->check instead of lockdep_no_validate
lockdep: Don't create the wrong dependency on hlock->check == 0
lockdep: Make held_lock->check and "int check" argument bool
locking/mcs: Allow architecture specific asm files to be used for contended case
locking/mcs: Order the header files in Kbuild of each architecture in alphabetical order
sched/wait: Suppress Sparse 'variable shadowing' warning
hung_task/Documentation: Fix hung_task_warnings description
locking/mcs: Allow architectures to hook in to contended paths
locking/mcs: Micro-optimize the MCS code, add extra comments
...
Diffstat (limited to 'kernel/locking/mutex-debug.c')
-rw-r--r-- | kernel/locking/mutex-debug.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/kernel/locking/mutex-debug.c b/kernel/locking/mutex-debug.c index faf6f5b53e77..e1191c996c59 100644 --- a/kernel/locking/mutex-debug.c +++ b/kernel/locking/mutex-debug.c | |||
@@ -83,6 +83,12 @@ void debug_mutex_unlock(struct mutex *lock) | |||
83 | 83 | ||
84 | DEBUG_LOCKS_WARN_ON(!lock->wait_list.prev && !lock->wait_list.next); | 84 | DEBUG_LOCKS_WARN_ON(!lock->wait_list.prev && !lock->wait_list.next); |
85 | mutex_clear_owner(lock); | 85 | mutex_clear_owner(lock); |
86 | |||
87 | /* | ||
88 | * __mutex_slowpath_needs_to_unlock() is explicitly 0 for debug | ||
89 | * mutexes so that we can do it here after we've verified state. | ||
90 | */ | ||
91 | atomic_set(&lock->count, 1); | ||
86 | } | 92 | } |
87 | 93 | ||
88 | void debug_mutex_init(struct mutex *lock, const char *name, | 94 | void debug_mutex_init(struct mutex *lock, const char *name, |