summaryrefslogtreecommitdiff
path: root/kernel/futex.c
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@google.com>2021-03-11 14:11:58 +0100
committerGreg Kroah-Hartman <gregkh@google.com>2021-03-11 14:11:58 +0100
commit58bc8e0469d0808754b42e423934da639c07b6ba (patch)
treed2e342b2cfd099bdb5059094da486b9a675e6e79 /kernel/futex.c
parentcdd21cb664348a2db84930701312b61b5bddd256 (diff)
parent707fec941720a244f8625dae70a0224f702d8c4f (diff)
Merge 4.4.261 into android-4.4-p
Changes in 4.4.261 futex: fix irq self-deadlock and satisfy assertion futex: fix spin_lock() / spin_unlock_irq() imbalance ALSA: ctxfi: cthw20k2: fix mask on conf to allow 4 bits rsxx: Return -EFAULT if copy_to_user() fails dm table: fix iterate_devices based device capability checks platform/x86: acer-wmi: Add new force_caps module parameter PCI: Add function 1 DMA alias quirk for Marvell 9215 SATA controller Linux 4.4.261 Signed-off-by: Greg Kroah-Hartman <gregkh@google.com> Change-Id: I76b495bd500980edfb9e37742b1863a55d80f359
Diffstat (limited to 'kernel/futex.c')
-rw-r--r--kernel/futex.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/kernel/futex.c b/kernel/futex.c
index a14b7ef90e5c..95cdc11c89f8 100644
--- a/kernel/futex.c
+++ b/kernel/futex.c
@@ -874,7 +874,9 @@ static void free_pi_state(struct futex_pi_state *pi_state)
* and has cleaned up the pi_state already
*/
if (pi_state->owner) {
+ raw_spin_lock_irq(&pi_state->pi_mutex.wait_lock);
pi_state_update_owner(pi_state, NULL);
+ raw_spin_unlock_irq(&pi_state->pi_mutex.wait_lock);
rt_mutex_proxy_unlock(&pi_state->pi_mutex);
}
@@ -1406,7 +1408,7 @@ static int wake_futex_pi(u32 __user *uaddr, u32 uval, struct futex_q *this,
if (pi_state->owner != current)
return -EINVAL;
- raw_spin_lock(&pi_state->pi_mutex.wait_lock);
+ raw_spin_lock_irq(&pi_state->pi_mutex.wait_lock);
new_owner = rt_mutex_next_owner(&pi_state->pi_mutex);
/*