[RHEL7,COMMIT] ms/futex: Unlock hb->lock in futex_wait_requeue_pi() error path

Submitted by Konstantin Khorenko on June 16, 2020, 10:54 a.m.

Details

Message ID 202006161054.05GAsKtk030688@finist-ce7.sw.ru
State New
Headers show

Patch hide | download patch | download mbox

diff --git a/kernel/futex.c b/kernel/futex.c
index b03ba47b566e3..40d87d6402e73 100644
--- a/kernel/futex.c
+++ b/kernel/futex.c
@@ -2633,6 +2633,7 @@  static int futex_wait_requeue_pi(u32 __user *uaddr, unsigned int flags,
 	 * shared futexes. We need to compare the keys:
 	 */
 	if (match_futex(&q.key, &key2)) {
+		queue_unlock(hb);
 		ret = -EINVAL;
 		goto out_put_keys;
 	}