888{
889 union futex_key key1, key2;
890 struct futex_hash_bucket *hb1, *hb2;
891 struct plist_head *head1;
892 struct futex_q *this, *next;
893 int ret, drop_count = 0;
894
895 retry:
896 futex_lock_mm(fshared);
897
898 ret = get_futex_key(uaddr1, fshared, &key1);
899 if (unlikely(ret != 0))
900 goto out;
901 ret = get_futex_key(uaddr2, fshared, &key2);
902 if (unlikely(ret != 0))
903 goto out;
904
905 hb1 = hash_futex(&key1);
906 hb2 = hash_futex(&key2);
907
908 double_lock_hb(hb1, hb2);
909
910 if (likely(cmpval != NULL)) {
911 u32 curval;
912
913 ret = get_futex_value_locked(&curval, uaddr1);
914
915 if (unlikely(ret)) {
916 spin_unlock(&hb1->lock);
917 if (hb1 != hb2)
918 spin_unlock(&hb2->lock);
919
920
921
922
923
924 futex_unlock_mm(fshared);
925
926 ret = get_user(curval, uaddr1);
927
928 if (!ret)