Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit855cf1e

Browse files
committed
Merge tag 'locking-urgent-2020-11-22' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
Pull locking fix from Thomas Gleixner: "A single fix for lockdep which makes the recursion protection cover graph lock/unlock"* tag 'locking-urgent-2020-11-22' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: lockdep: Put graph lock/unlock under lock_recursion protection
2 parents68d3fa2 +43be438 commit855cf1e

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

‎kernel/locking/lockdep.c‎

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -108,19 +108,21 @@ static inline void lockdep_lock(void)
108108
{
109109
DEBUG_LOCKS_WARN_ON(!irqs_disabled());
110110

111+
__this_cpu_inc(lockdep_recursion);
111112
arch_spin_lock(&__lock);
112113
__owner=current;
113-
__this_cpu_inc(lockdep_recursion);
114114
}
115115

116116
staticinlinevoidlockdep_unlock(void)
117117
{
118+
DEBUG_LOCKS_WARN_ON(!irqs_disabled());
119+
118120
if (debug_locks&&DEBUG_LOCKS_WARN_ON(__owner!=current))
119121
return;
120122

121-
__this_cpu_dec(lockdep_recursion);
122123
__owner=NULL;
123124
arch_spin_unlock(&__lock);
125+
__this_cpu_dec(lockdep_recursion);
124126
}
125127

126128
staticinlineboollockdep_assert_locked(void)

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp