mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [GIT pull] locking/urgent for v5.10-rc5
@ 2020-11-22 14:47 Thomas Gleixner
  2020-11-22 14:47 ` [GIT pull] perf/urgent " Thomas Gleixner
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Thomas Gleixner @ 2020-11-22 14:47 UTC (permalink / raw)
  To: Linus Torvalds; +Cc: linux-kernel, x86

Linus,

please pull the latest locking/urgent branch from:

   git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git locking-urgent-2020-11-22

up to:  43be4388e94b: lockdep: Put graph lock/unlock under lock_recursion protection


A single fix for lockdep which makes the recursion protection cover graph
lock/unlock.


Thanks,

	tglx

------------------>
Boqun Feng (1):
      lockdep: Put graph lock/unlock under lock_recursion protection


 kernel/locking/lockdep.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/kernel/locking/lockdep.c b/kernel/locking/lockdep.c
index d9fb9e19d2ed..c1418b47f625 100644
--- a/kernel/locking/lockdep.c
+++ b/kernel/locking/lockdep.c
@@ -108,19 +108,21 @@ static inline void lockdep_lock(void)
 {
 	DEBUG_LOCKS_WARN_ON(!irqs_disabled());
 
+	__this_cpu_inc(lockdep_recursion);
 	arch_spin_lock(&__lock);
 	__owner = current;
-	__this_cpu_inc(lockdep_recursion);
 }
 
 static inline void lockdep_unlock(void)
 {
+	DEBUG_LOCKS_WARN_ON(!irqs_disabled());
+
 	if (debug_locks && DEBUG_LOCKS_WARN_ON(__owner != current))
 		return;
 
-	__this_cpu_dec(lockdep_recursion);
 	__owner = NULL;
 	arch_spin_unlock(&__lock);
+	__this_cpu_dec(lockdep_recursion);
 }
 
 static inline bool lockdep_assert_locked(void)


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2020-11-22 21:35 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-11-22 14:47 [GIT pull] locking/urgent for v5.10-rc5 Thomas Gleixner
2020-11-22 14:47 ` [GIT pull] perf/urgent " Thomas Gleixner
2020-11-22 21:35   ` pr-tracker-bot
2020-11-22 14:47 ` [GIT pull] sched/urgent " Thomas Gleixner
2020-11-22 21:35   ` pr-tracker-bot
2020-11-22 21:35 ` [GIT pull] locking/urgent " pr-tracker-bot

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®