diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2019-04-20 18:38:01 +0200 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2019-04-20 18:38:01 +0200 |
commit | de3af9a99013fdb0358bb990e9bed0172c65bba9 (patch) | |
tree | 185896b154debbd5ee1832354e336aefb355e5ea /kernel | |
parent | Merge branch 'for-5.1-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git... (diff) | |
parent | locking/atomics: Don't assume that scripts are executable (diff) | |
download | linux-de3af9a99013fdb0358bb990e9bed0172c65bba9.tar.xz linux-de3af9a99013fdb0358bb990e9bed0172c65bba9.zip |
Merge branch 'locking-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
Pull locking fixes from Ingo Molnar:
"A lockdep warning fix and a script execution fix when atomics are
generated"
* 'locking-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
locking/atomics: Don't assume that scripts are executable
locking/lockdep: Make lockdep_unregister_key() honor 'debug_locks' again
Diffstat (limited to 'kernel')
-rw-r--r-- | kernel/locking/lockdep.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/kernel/locking/lockdep.c b/kernel/locking/lockdep.c index e16766ff184b..e221be724fe8 100644 --- a/kernel/locking/lockdep.c +++ b/kernel/locking/lockdep.c @@ -4907,8 +4907,9 @@ void lockdep_unregister_key(struct lock_class_key *key) return; raw_local_irq_save(flags); - arch_spin_lock(&lockdep_lock); - current->lockdep_recursion = 1; + if (!graph_lock()) + goto out_irq; + pf = get_pending_free(); hlist_for_each_entry_rcu(k, hash_head, hash_entry) { if (k == key) { @@ -4920,8 +4921,8 @@ void lockdep_unregister_key(struct lock_class_key *key) WARN_ON_ONCE(!found); __lockdep_free_key_range(pf, key, 1); call_rcu_zapped(pf); - current->lockdep_recursion = 0; - arch_spin_unlock(&lockdep_lock); + graph_unlock(); +out_irq: raw_local_irq_restore(flags); /* Wait until is_dynamic_key() has finished accessing k->hash_entry. */ |