diff options
| -rw-r--r-- | kernel/locking/lockdep.c | 9 | ||||
| -rw-r--r-- | scripts/atomic/gen-atomics.sh | 2 |
2 files changed, 6 insertions, 5 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) | |||
| 4907 | return; | 4907 | return; |
| 4908 | 4908 | ||
| 4909 | raw_local_irq_save(flags); | 4909 | raw_local_irq_save(flags); |
| 4910 | arch_spin_lock(&lockdep_lock); | 4910 | if (!graph_lock()) |
| 4911 | current->lockdep_recursion = 1; | 4911 | goto out_irq; |
| 4912 | |||
| 4912 | pf = get_pending_free(); | 4913 | pf = get_pending_free(); |
| 4913 | hlist_for_each_entry_rcu(k, hash_head, hash_entry) { | 4914 | hlist_for_each_entry_rcu(k, hash_head, hash_entry) { |
| 4914 | if (k == key) { | 4915 | if (k == key) { |
| @@ -4920,8 +4921,8 @@ void lockdep_unregister_key(struct lock_class_key *key) | |||
| 4920 | WARN_ON_ONCE(!found); | 4921 | WARN_ON_ONCE(!found); |
| 4921 | __lockdep_free_key_range(pf, key, 1); | 4922 | __lockdep_free_key_range(pf, key, 1); |
| 4922 | call_rcu_zapped(pf); | 4923 | call_rcu_zapped(pf); |
| 4923 | current->lockdep_recursion = 0; | 4924 | graph_unlock(); |
| 4924 | arch_spin_unlock(&lockdep_lock); | 4925 | out_irq: |
| 4925 | raw_local_irq_restore(flags); | 4926 | raw_local_irq_restore(flags); |
| 4926 | 4927 | ||
| 4927 | /* Wait until is_dynamic_key() has finished accessing k->hash_entry. */ | 4928 | /* Wait until is_dynamic_key() has finished accessing k->hash_entry. */ |
diff --git a/scripts/atomic/gen-atomics.sh b/scripts/atomic/gen-atomics.sh index 27400b0cd732..000dc6437893 100644 --- a/scripts/atomic/gen-atomics.sh +++ b/scripts/atomic/gen-atomics.sh | |||
| @@ -13,7 +13,7 @@ gen-atomic-long.sh asm-generic/atomic-long.h | |||
| 13 | gen-atomic-fallback.sh linux/atomic-fallback.h | 13 | gen-atomic-fallback.sh linux/atomic-fallback.h |
| 14 | EOF | 14 | EOF |
| 15 | while read script header; do | 15 | while read script header; do |
| 16 | ${ATOMICDIR}/${script} ${ATOMICTBL} > ${LINUXDIR}/include/${header} | 16 | /bin/sh ${ATOMICDIR}/${script} ${ATOMICTBL} > ${LINUXDIR}/include/${header} |
| 17 | HASH="$(sha1sum ${LINUXDIR}/include/${header})" | 17 | HASH="$(sha1sum ${LINUXDIR}/include/${header})" |
| 18 | HASH="${HASH%% *}" | 18 | HASH="${HASH%% *}" |
| 19 | printf "// %s\n" "${HASH}" >> ${LINUXDIR}/include/${header} | 19 | printf "// %s\n" "${HASH}" >> ${LINUXDIR}/include/${header} |
