The patch titled sun disk label: fix signed int usage for sector count has been removed from the -mm tree. Its filename is sun-disk-label-fix-signed-int-usage-for-sector-count.patch This patch was dropped because it was merged into mainline or a subsystem tree ------------------------------------------------------ Subject: sun disk label: fix signed int usage for sector count From: Jeff Mahoney <jeffm@xxxxxxxx> The current sun disklabel code uses a signed int for the sector count. When partitions larger than 1 TB are used, the cast to a sector_t causes the partition sizes to be invalid: # cat /proc/paritions | grep sdan 66 112 2146435072 sdan 66 115 9223372036853660736 sdan3 66 120 9223372036853660736 sdan8 This patch switches the sector count to an unsigned int to fix this. Signed-off-by: Jeff Mahoney <jeffm@xxxxxxxx> Signed-off-by: Andrew Morton <akpm@xxxxxxxx> --- fs/partitions/sun.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff -puN fs/partitions/sun.c~sun-disk-label-fix-signed-int-usage-for-sector-count fs/partitions/sun.c --- a/fs/partitions/sun.c~sun-disk-label-fix-signed-int-usage-for-sector-count +++ a/fs/partitions/sun.c @@ -74,10 +74,18 @@ int sun_partition(struct parsed_partitio spc = be16_to_cpu(label->ntrks) * be16_to_cpu(label->nsect); for (i = 0; i < 8; i++, p++) { unsigned long st_sector; - int num_sectors; + unsigned int num_sectors; st_sector = be32_to_cpu(p->start_cylinder) * spc; num_sectors = be32_to_cpu(p->num_sectors); + + if (num_sectors > INT_MAX) { + printk("Dev %s Sun disklabel: partition %d has " + "invalid size > 1 TB\n", bdevname(bdev, b), i); + put_dev_sector(sec); + return 0; + } + if (num_sectors) { put_partition(state, slot, st_sector, num_sectors); if (label->infos[i].id == LINUX_RAID_PARTITION) _ Patches currently in -mm which might be from jeffm@xxxxxxxx are reiserfs-warn-about-the-useless-nolargeio-option.patch reiserfs-fix-is_reusable-bitmap-check-to-not-traverse-the-bitmap-info-array.patch reiserfs-clean-up-bitmap-block-buffer-head-references.patch reiserfs-reorganize-bitmap-loading-functions.patch reiserfs-on-demand-bitmap-loading.patch reiserfs-use-generic_file_open-for-open-checks.patch reiserfs-eliminate-minimum-window-size-for-bitmap-searching.patch - To unsubscribe from this list: send the line "unsubscribe mm-commits" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html