Merge branch 'stable-3.2' into pandora-3.2
[pandora-kernel.git] / kernel / futex.c
index 3854e75..5e48378 100644 (file)
@@ -1376,6 +1376,9 @@ static int futex_requeue(u32 __user *uaddr1, unsigned int flags,
        struct plist_head *head1;
        struct futex_q *this, *next;
 
+       if (nr_wake < 0 || nr_requeue < 0)
+               return -EINVAL;
+
        if (requeue_pi) {
                /*
                 * Requeue PI only works on two distinct uaddrs. This