|
@@ -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;
|
|
|
}
|
|
|
|