Commit c8b15a70 authored by Thomas Gleixner's avatar Thomas Gleixner

futex: cleanup error exit

Reuse the put_key_ref(key2) call in the exit path.
Signed-off-by: default avatarThomas Gleixner <tglx@linutronix.de>
parent 521c1808
...@@ -2185,10 +2185,8 @@ static int futex_wait_requeue_pi(u32 __user *uaddr, int fshared, ...@@ -2185,10 +2185,8 @@ static int futex_wait_requeue_pi(u32 __user *uaddr, int fshared,
/* Prepare to wait on uaddr. */ /* Prepare to wait on uaddr. */
ret = futex_wait_setup(uaddr, val, fshared, &q, &hb); ret = futex_wait_setup(uaddr, val, fshared, &q, &hb);
if (ret) { if (ret)
put_futex_key(fshared, &key2); goto out_key2;
goto out;
}
/* Queue the futex_q, drop the hb lock, wait for wakeup. */ /* Queue the futex_q, drop the hb lock, wait for wakeup. */
futex_wait_queue_me(hb, &q, to); futex_wait_queue_me(hb, &q, to);
...@@ -2282,6 +2280,7 @@ static int futex_wait_requeue_pi(u32 __user *uaddr, int fshared, ...@@ -2282,6 +2280,7 @@ static int futex_wait_requeue_pi(u32 __user *uaddr, int fshared,
out_put_keys: out_put_keys:
put_futex_key(fshared, &q.key); put_futex_key(fshared, &q.key);
out_key2:
put_futex_key(fshared, &key2); put_futex_key(fshared, &key2);
out: out:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment