ret = get_user(dummy, uaddr2);
                if (ret)
-                       return ret;
+                       goto out_put_keys;
 
+               put_futex_key(fshared, &key2);
+               put_futex_key(fshared, &key1);
                goto retryfull;
        }
 
                        if (hb1 != hb2)
                                spin_unlock(&hb2->lock);
 
+                       put_futex_key(fshared, &key2);
+                       put_futex_key(fshared, &key1);
+
                        ret = get_user(curval, uaddr1);
 
                        if (!ret)
                         * exit to complete.
                         */
                        queue_unlock(&q, hb);
+                       put_futex_key(fshared, &q.key);
                        cond_resched();
                        goto retry;
 
 
        ret = get_user(uval, uaddr);
        if (!ret)
-               goto retry;
+               goto retry_unlocked;
 
-       if (to)
-               destroy_hrtimer_on_stack(&to->timer);
-       return ret;
+       goto out_put_key;
 }
 
+
 /*
  * Userspace attempted a TID -> 0 atomic transition, and failed.
  * This is the in-kernel slowpath: we look up the PI state (if any),
        }
 
        ret = get_user(uval, uaddr);
+       put_futex_key(fshared, &key);
        if (!ret)
                goto retry;