+ make-kernel-ignore-bogus-partitions.patch added to -mm tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The patch titled

     make kernel ignore bogus partitions

has been added to the -mm tree.  Its filename is

     make-kernel-ignore-bogus-partitions.patch

See http://www.zip.com.au/~akpm/linux/patches/stuff/added-to-mm.txt to find
out what to do about this


From: "Mike Miller (OS Dev)" <mikem@xxxxxxxxxxxxxxxxxxxxxxx>

Sometimes partitions claim to be larger than the reported capacity of a
disk device.  This patch makes the kernel ignore those partitions.

Signed-off-by: Mike Miller <mike.miller@xxxxxx>
Signed-off-by: Stephen Cameron <steve.cameron@xxxxxx>
Signed-off-by: Andrew Morton <akpm@xxxxxxxx>
---

 fs/partitions/check.c |    5 +++++
 1 files changed, 5 insertions(+)

diff -puN fs/partitions/check.c~make-kernel-ignore-bogus-partitions fs/partitions/check.c
--- 25/fs/partitions/check.c~make-kernel-ignore-bogus-partitions	Tue May  9 12:40:47 2006
+++ 25-akpm/fs/partitions/check.c	Tue May  9 12:40:47 2006
@@ -461,6 +461,11 @@ int rescan_partitions(struct gendisk *di
 		sector_t from = state->parts[p].from;
 		if (!size)
 			continue;
+		if (from+size-1 > get_capacity(disk)) {
+			printk(" %s: p%d exceeds device capacity, ignoring.\n",
+				disk->disk_name, p);
+			continue;
+		}
 		add_partition(disk, p, from, size);
 #ifdef CONFIG_BLK_DEV_MD
 		if (state->parts[p].flags)
_

Patches currently in -mm which might be from mikem@xxxxxxxxxxxxxxxxxxxxxxx are

make-kernel-ignore-bogus-partitions.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

[Index of Archives]     [Kernel Newbies FAQ]     [Kernel Archive]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [Bugtraq]     [Photo]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]

  Powered by Linux