Merge commit 'v2.6.39-rc6' into x86/cleanups
[pandora-kernel.git] / arch / arm / kernel / sys_oabi-compat.c
index 4ad8da1..af0aaeb 100644 (file)
@@ -311,7 +311,7 @@ asmlinkage long sys_oabi_semtimedop(int semid,
        long err;
        int i;
 
-       if (nsops < 1)
+       if (nsops < 1 || nsops > SEMOPM)
                return -EINVAL;
        sops = kmalloc(sizeof(*sops) * nsops, GFP_KERNEL);
        if (!sops)