[to-be-updated] hpet-clean-up-io-mapping-when-hpet_alloc-fails.patch removed from -mm tree

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

 



The patch titled
     hpet: clean up io mapping when hpet_alloc() fails
has been removed from the -mm tree.  Its filename was
     hpet-clean-up-io-mapping-when-hpet_alloc-fails.patch

This patch was dropped because an updated version will be merged

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

------------------------------------------------------
Subject: hpet: clean up io mapping when hpet_alloc() fails
From: Bjorn Helgaas <bjorn.helgaas@xxxxxx>

When hpet_alloc() fails, we should iounmap() the timer so we don't leak
the mapping.

Signed-off-by: Bjorn Helgaas <bjorn.helgaas@xxxxxx>
Cc: Venkatesh Pallipadi <venki@xxxxxxxxxx>
Cc: Clemens Ladisch <clemens@xxxxxxxxxx>
Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>
---

 drivers/char/hpet.c |    8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff -puN drivers/char/hpet.c~hpet-clean-up-io-mapping-when-hpet_alloc-fails drivers/char/hpet.c
--- a/drivers/char/hpet.c~hpet-clean-up-io-mapping-when-hpet_alloc-fails
+++ a/drivers/char/hpet.c
@@ -949,7 +949,7 @@ static int hpet_pnp_add(struct pnp_dev *
 {
 	struct hpet_data data;
 	struct resource *mem, *irq;
-	int i;
+	int i, ret;
 
 	memset(&data, 0, sizeof(data));
 
@@ -969,7 +969,11 @@ static int hpet_pnp_add(struct pnp_dev *
 	data.hd_phys_address = mem->start;
 	data.hd_address = ioremap(mem->start, resource_size(mem));
 
-	return hpet_alloc(&data);
+	ret = hpet_alloc(&data);
+	if (ret)
+		iounmap(data.hd_address);
+
+	return ret;
 }
 
 static void hpet_pnp_remove(struct pnp_dev *dev)
_

Patches currently in -mm which might be from bjorn.helgaas@xxxxxx are

linux-next.patch
hpet-clean-up-io-mapping-when-hpet_alloc-fails.patch
maintainers-remove-obsolete-hpet-acpi-entry.patch
ipmi-raise-precedence-of-pnp-based-discovery-mechanisms-acpi-pci.patch
ipmi-convert-tracking-of-the-acpi-device-pointer-to-a-pnp-device.patch
ipmi-update-driver-to-use-dev_printk-and-its-constructs.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