+ fix-a-memory-leak-in-the-i386-setup-code.patch added to -mm tree

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

 



The patch titled

     Fix a memory leak in the i386 setup code

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

     fix-a-memory-leak-in-the-i386-setup-code.patch

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

------------------------------------------------------
Subject: Fix a memory leak in the i386 setup code
From: Catalin Marinas <catalin.marinas@xxxxxxxxx>

Signed-off-by: Catalin Marinas <catalin.marinas@xxxxxxxxx>
Signed-off-by: Andrew Morton <akpm@xxxxxxxx>
---

 arch/i386/kernel/setup.c |    5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff -puN arch/i386/kernel/setup.c~fix-a-memory-leak-in-the-i386-setup-code arch/i386/kernel/setup.c
--- a/arch/i386/kernel/setup.c~fix-a-memory-leak-in-the-i386-setup-code
+++ a/arch/i386/kernel/setup.c
@@ -1331,7 +1331,10 @@ legacy_init_iomem_resources(struct resou
 		res->start = e820.map[i].addr;
 		res->end = res->start + e820.map[i].size - 1;
 		res->flags = IORESOURCE_MEM | IORESOURCE_BUSY;
-		request_resource(&iomem_resource, res);
+		if (request_resource(&iomem_resource, res)) {
+			kfree(res);
+			continue;
+		}
 		if (e820.map[i].type == E820_RAM) {
 			/*
 			 *  We don't know which RAM region contains kernel data,
_

Patches currently in -mm which might be from catalin.marinas@xxxxxxxxx are

fix-a-memory-leak-in-the-i386-setup-code.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