Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 114899
b: refs/heads/master
c: ac0d86f
h: refs/heads/master
i:
  114897: 3149848
  114895: 379b10c
v: v3
  • Loading branch information
Kay Sievers authored and Linus Torvalds committed Oct 16, 2008
1 parent eeb288c commit 3fa582e
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 3 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 6722e45c2de622eaf5f26d370b9de19632ac7478
refs/heads/master: ac0d86f5809598ddcd6bfa0ea8245ccc910e9eac
17 changes: 15 additions & 2 deletions trunk/fs/partitions/check.c
Original file line number Diff line number Diff line change
Expand Up @@ -538,10 +538,23 @@ int rescan_partitions(struct gendisk *disk, struct block_device *bdev)
sector_t from = state->parts[p].from;
if (!size)
continue;
if (from >= get_capacity(disk)) {
printk(KERN_WARNING
"%s: p%d ignored, start %llu is behind the end of the disk\n",
disk->disk_name, p, (unsigned long long) from);
continue;
}
if (from + size > get_capacity(disk)) {
/*
* we can not ignore partitions of broken tables
* created by for example camera firmware, but we
* limit them to the end of the disk to avoid
* creating invalid block devices
*/
printk(KERN_WARNING
"%s: p%d exceeds device capacity\n",
disk->disk_name, p);
"%s: p%d size %llu limited to end of disk\n",
disk->disk_name, p, (unsigned long long) size);
size = get_capacity(disk) - from;
}
res = add_partition(disk, p, from, size, state->parts[p].flags);
if (res) {
Expand Down

0 comments on commit 3fa582e

Please sign in to comment.