- mtdpart-fix-a-division-by-zero-bug.patch removed from -mm tree

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

 



The patch titled
     mtdpart: fix a division by zero bug
has been removed from the -mm tree.  Its filename was
     mtdpart-fix-a-division-by-zero-bug.patch

This patch was dropped because it was merged into mainline or a subsystem tree

The current -mm tree may be found at http://userweb.kernel.org/~akpm/mmotm/

------------------------------------------------------
Subject: mtdpart: fix a division by zero bug
From: Atsushi Nemoto <anemo@xxxxxxxxxxxxx>

When detecting a partition beyond the end of the device, skip most of the
initialisation, in particular those bits causing a division by zero.

Signed-off-by: Joern Engel <joern@xxxxxxxxx>
Signed-off-by: Atsushi Nemoto <anemo@xxxxxxxxxxxxx>
Cc: David Woodhouse <dwmw2@xxxxxxxxxxxxx>
Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>
---

 drivers/mtd/mtdpart.c |    4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff -puN drivers/mtd/mtdpart.c~mtdpart-fix-a-division-by-zero-bug drivers/mtd/mtdpart.c
--- a/drivers/mtd/mtdpart.c~mtdpart-fix-a-division-by-zero-bug
+++ a/drivers/mtd/mtdpart.c
@@ -411,11 +411,12 @@ static struct mtd_part *add_one_partitio
 
 	/* let's do some sanity checks */
 	if (slave->offset >= master->size) {
-			/* let's register it anyway to preserve ordering */
+		/* let's register it anyway to preserve ordering */
 		slave->offset = 0;
 		slave->mtd.size = 0;
 		printk(KERN_ERR"mtd: partition \"%s\" is out of reach -- disabled\n",
 			part->name);
+		goto out_register;
 	}
 	if (slave->offset + slave->mtd.size > master->size) {
 		slave->mtd.size = master->size - slave->offset;
@@ -475,6 +476,7 @@ static struct mtd_part *add_one_partitio
 		}
 	}
 
+out_register:
 	if (part->mtdp) {
 		/* store the object pointer (caller may or may not register it*/
 		*part->mtdp = &slave->mtd;
_

Patches currently in -mm which might be from anemo@xxxxxxxxxxxxx are

origin.patch
gpio-fix-build-on-config_gpio_sysfs=n.patch
linux-next.patch
mtdpart-handle-remaining-checkpatch-findings.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