X-Git-Url: http://git.efficios.com/?a=blobdiff_plain;f=block%2Fioctl.c;h=4a85096f5410adde92d01cd58ecba30373c808f1;hb=cdcd3ac4e945d1fcaef9907839569c2d70b2f3fa;hp=4476e0e85d1687c08b31f81e7f633ae802b14814;hpb=410fc4ce8a373a3c35c73ac2c7c29f2bac6400bf;p=deliverable%2Flinux.git diff --git a/block/ioctl.c b/block/ioctl.c index 4476e0e85d16..4a85096f5410 100644 --- a/block/ioctl.c +++ b/block/ioctl.c @@ -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; }