[GIT pull] locking/urgent for v6.11-rc2

Thomas Gleixner posted 1 patch 1 year, 4 months ago
kernel/jump_label.c                 | 4 ++--
kernel/locking/qspinlock_paravirt.h | 2 +-
2 files changed, 3 insertions(+), 3 deletions(-)
[GIT pull] locking/urgent for v6.11-rc2
Posted by Thomas Gleixner 1 year, 4 months ago
Linus,

please pull the latest locking/urgent branch from:

   git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git locking-urgent-2024-08-04

up to:  224fa3552029: jump_label: Fix the fix, brown paper bags galore


Two fixes for locking and jump labels:

   - Ensure that the atomic_cmpxchg() conditions are correct and evaluating
     to true on any non-zero value except 1. The missing check of the
     return value leads to inconsisted state of the jump label counter.

   - Add a missing type conversion in the paravirt spinlock code which
     makes loongson build again.


Thanks,

	tglx

------------------>
Peter Zijlstra (1):
      jump_label: Fix the fix, brown paper bags galore

Uros Bizjak (1):
      locking/pvqspinlock: Correct the type of "old" variable in pv_kick_node()


 kernel/jump_label.c                 | 4 ++--
 kernel/locking/qspinlock_paravirt.h | 2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/kernel/jump_label.c b/kernel/jump_label.c
index 4ad5ed8adf96..6dc76b590703 100644
--- a/kernel/jump_label.c
+++ b/kernel/jump_label.c
@@ -236,7 +236,7 @@ void static_key_disable_cpuslocked(struct static_key *key)
 	}
 
 	jump_label_lock();
-	if (atomic_cmpxchg(&key->enabled, 1, 0))
+	if (atomic_cmpxchg(&key->enabled, 1, 0) == 1)
 		jump_label_update(key);
 	jump_label_unlock();
 }
@@ -289,7 +289,7 @@ static void __static_key_slow_dec_cpuslocked(struct static_key *key)
 		return;
 
 	guard(mutex)(&jump_label_mutex);
-	if (atomic_cmpxchg(&key->enabled, 1, 0))
+	if (atomic_cmpxchg(&key->enabled, 1, 0) == 1)
 		jump_label_update(key);
 	else
 		WARN_ON_ONCE(!static_key_slow_try_dec(key));
diff --git a/kernel/locking/qspinlock_paravirt.h b/kernel/locking/qspinlock_paravirt.h
index f5a36e67b593..ac2e22502741 100644
--- a/kernel/locking/qspinlock_paravirt.h
+++ b/kernel/locking/qspinlock_paravirt.h
@@ -357,7 +357,7 @@ static void pv_wait_node(struct mcs_spinlock *node, struct mcs_spinlock *prev)
 static void pv_kick_node(struct qspinlock *lock, struct mcs_spinlock *node)
 {
 	struct pv_node *pn = (struct pv_node *)node;
-	enum vcpu_state old = vcpu_halted;
+	u8 old = vcpu_halted;
 	/*
 	 * If the vCPU is indeed halted, advance its state to match that of
 	 * pv_wait_node(). If OTOH this fails, the vCPU was running and will
Re: [GIT pull] locking/urgent for v6.11-rc2
Posted by pr-tracker-bot@kernel.org 1 year, 4 months ago
The pull request you sent on Sun,  4 Aug 2024 15:02:53 +0200 (CEST):

> git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git locking-urgent-2024-08-04

has been merged into torvalds/linux.git:
https://git.kernel.org/torvalds/c/3bc70ad12097c19cd6c687bc5b12c31da14b63f7

Thank you!

-- 
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/prtracker.html