All of lore.kernel.org
 help / color / mirror / Atom feed
From: Davidlohr Bueso <dave@stgolabs.net>
To: tglx@linutronix.de, mingo@redhat.com
Cc: peterz@infradead.org, dvhart@infradead.org,
	linux-kernel@vger.kernel.org, dave@stgolabs.net,
	Davidlohr Bueso <dbueso@suse.de>
Subject: [PATCH 1/2] futex: Fix irq mismatch in exit_pi_state_list()
Date: Sun, 14 Mar 2021 22:02:23 -0700	[thread overview]
Message-ID: <20210315050224.107056-2-dave@stgolabs.net> (raw)
In-Reply-To: <20210315050224.107056-1-dave@stgolabs.net>

The pi_mutex->wait_lock is irq safe and needs to enable local
interrupts upon unlocking, matching it's corresponding
raw_spin_lock_irq().

Fixes: c74aef2d06a9f (futex: Fix pi_state->owner serialization)
Signed-off-by: Davidlohr Bueso <dbueso@suse.de>
---
 kernel/futex.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/kernel/futex.c b/kernel/futex.c
index 475055715371..ded7af2ba87f 100644
--- a/kernel/futex.c
+++ b/kernel/futex.c
@@ -885,7 +885,7 @@ static void exit_pi_state_list(struct task_struct *curr)
 		 */
 		if (head->next != next) {
 			/* retain curr->pi_lock for the loop invariant */
-			raw_spin_unlock(&pi_state->pi_mutex.wait_lock);
+			raw_spin_unlock_irq(&pi_state->pi_mutex.wait_lock);
 			spin_unlock(&hb->lock);
 			put_pi_state(pi_state);
 			continue;
-- 
2.26.2


  reply	other threads:[~2021-03-15  5:03 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-03-15  5:02 [PATCH -tip 0/2] futex: Two pi fixes Davidlohr Bueso
2021-03-15  5:02 ` Davidlohr Bueso [this message]
2021-03-15 13:12   ` [PATCH 1/2] futex: Fix irq mismatch in exit_pi_state_list() Peter Zijlstra
2021-03-15 19:03     ` Davidlohr Bueso
2021-03-15  5:02 ` [PATCH 2/2] futex: Leave the pi lock stealer in a consistent state upon successful fault Davidlohr Bueso
2021-03-16 11:20   ` Peter Zijlstra
2021-03-16 18:03     ` Davidlohr Bueso
2021-03-16 19:48       ` Thomas Gleixner
2021-03-16 20:12       ` Peter Zijlstra

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210315050224.107056-2-dave@stgolabs.net \
    --to=dave@stgolabs.net \
    --cc=dbueso@suse.de \
    --cc=dvhart@infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@redhat.com \
    --cc=peterz@infradead.org \
    --cc=tglx@linutronix.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.