]> rtime.felk.cvut.cz Git - can-eth-gw-linux.git/blobdiff - block/ioctl.c
Merge branch 'for-3.7/core' of git://git.kernel.dk/linux-block
[can-eth-gw-linux.git] / block / ioctl.c
index 769d2960c0a623d34b84ceb78c2570ec322b9693..a31d91d9bc5a33d70388b0063e1d80c41383c125 100644 (file)
@@ -41,7 +41,7 @@ static int blkpg_ioctl(struct block_device *bdev, struct blkpg_ioctl_arg __user
                            sizeof(long long) > sizeof(long)) {
                                long pstart = start, plength = length;
                                if (pstart != start || plength != length
-                                   || pstart < 0 || plength < 0)
+                                   || pstart < 0 || plength < 0 || partno > 65535)
                                        return -EINVAL;
                        }