projects
/
GitHub
/
moto-9609
/
android_kernel_motorola_exynos9610.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
97651ea
)
blk: add an upper sanity check on partition adding
author
Alan Cox
<alan@linux.intel.com>
Mon, 17 Sep 2012 10:47:13 +0000
(11:47 +0100)
committer
Jens Axboe
<axboe@kernel.dk>
Tue, 18 Sep 2012 09:56:29 +0000
(11:56 +0200)
65536 should be ludicrous anyway but without it we overflow the
memory computation doing the allocation and badness occurs.
Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
block/ioctl.c
patch
|
blob
|
blame
|
history
diff --git
a/block/ioctl.c
b/block/ioctl.c
index 4476e0e85d1687c08b31f81e7f633ae802b14814..4a85096f5410adde92d01cd58ecba30373c808f1 100644
(file)
--- 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;
}