summaryrefslogtreecommitdiff
path: root/kernel/futex.c
diff options
context:
space:
mode:
authorPeter Zijlstra <peterz@infradead.org>2020-12-09 19:08:45 +0300
committerPeter Zijlstra <peterz@infradead.org>2020-12-09 19:08:45 +0300
commit2b3c99ee6389d33aff91d9e7a55465d7d1332bbd (patch)
tree9e1e5d839d80c95854007c958f2c367290bf1090 /kernel/futex.c
parent97d62caa32d6d79dadae3f8d19af5c92ea9a589a (diff)
parent31784cff7ee073b34d6eddabb95e3be2880a425c (diff)
downloadlinux-2b3c99ee6389d33aff91d9e7a55465d7d1332bbd.tar.xz
Merge branch 'locking/rwsem'
Diffstat (limited to 'kernel/futex.c')
-rw-r--r--kernel/futex.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/kernel/futex.c b/kernel/futex.c
index aee6ce294d84..c47d1015d759 100644
--- a/kernel/futex.c
+++ b/kernel/futex.c
@@ -786,8 +786,9 @@ static void put_pi_state(struct futex_pi_state *pi_state)
*/
if (pi_state->owner) {
struct task_struct *owner;
+ unsigned long flags;
- raw_spin_lock_irq(&pi_state->pi_mutex.wait_lock);
+ raw_spin_lock_irqsave(&pi_state->pi_mutex.wait_lock, flags);
owner = pi_state->owner;
if (owner) {
raw_spin_lock(&owner->pi_lock);
@@ -795,7 +796,7 @@ static void put_pi_state(struct futex_pi_state *pi_state)
raw_spin_unlock(&owner->pi_lock);
}
rt_mutex_proxy_unlock(&pi_state->pi_mutex, owner);
- raw_spin_unlock_irq(&pi_state->pi_mutex.wait_lock);
+ raw_spin_unlock_irqrestore(&pi_state->pi_mutex.wait_lock, flags);
}
if (current->pi_state_cache) {