diff options
Diffstat (limited to 'fs/partitions/check.c')
-rw-r--r-- | fs/partitions/check.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/fs/partitions/check.c b/fs/partitions/check.c index cd885b23cb5c..2ef313a96b66 100644 --- a/fs/partitions/check.c +++ b/fs/partitions/check.c | |||
@@ -484,6 +484,10 @@ int rescan_partitions(struct gendisk *disk, struct block_device *bdev) | |||
484 | sector_t from = state->parts[p].from; | 484 | sector_t from = state->parts[p].from; |
485 | if (!size) | 485 | if (!size) |
486 | continue; | 486 | continue; |
487 | if (from + size > get_capacity(disk)) { | ||
488 | printk(" %s: p%d exceeds device capacity\n", | ||
489 | disk->disk_name, p); | ||
490 | } | ||
487 | add_partition(disk, p, from, size); | 491 | add_partition(disk, p, from, size); |
488 | #ifdef CONFIG_BLK_DEV_MD | 492 | #ifdef CONFIG_BLK_DEV_MD |
489 | if (state->parts[p].flags) | 493 | if (state->parts[p].flags) |