stable.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Patch "ACPI / LPSS: Fix up acpi_lpss_create_device()" has been added to the 4.1-stable tree
@ 2015-07-31  0:42 gregkh
  0 siblings, 0 replies; only message in thread
From: gregkh @ 2015-07-31  0:42 UTC (permalink / raw)
  To: rafael.j.wysocki, dan.carpenter, gregkh; +Cc: stable, stable-commits


This is a note to let you know that I've just added the patch titled

    ACPI / LPSS: Fix up acpi_lpss_create_device()

to the 4.1-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     acpi-lpss-fix-up-acpi_lpss_create_device.patch
and it can be found in the queue-4.1 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@vger.kernel.org> know about it.


>From d3e13ff3c1aa2403d9a5f371baac088daeb8f56d Mon Sep 17 00:00:00 2001
From: "Rafael J. Wysocki" <rafael.j.wysocki@intel.com>
Date: Tue, 7 Jul 2015 00:31:47 +0200
Subject: ACPI / LPSS: Fix up acpi_lpss_create_device()

From: "Rafael J. Wysocki" <rafael.j.wysocki@intel.com>

commit d3e13ff3c1aa2403d9a5f371baac088daeb8f56d upstream.

Fix a return value (which should be a negative error code) and a
memory leak (the list allocated by acpi_dev_get_resources() needs
to be freed on ioremap() errors too) in acpi_lpss_create_device()
introduced by commit 4483d59e29fe 'ACPI / LPSS: check the result
of ioremap()'.

Fixes: 4483d59e29fe 'ACPI / LPSS: check the result of ioremap()'
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 drivers/acpi/acpi_lpss.c |    7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

--- a/drivers/acpi/acpi_lpss.c
+++ b/drivers/acpi/acpi_lpss.c
@@ -352,13 +352,16 @@ static int acpi_lpss_create_device(struc
 				pdata->mmio_size = resource_size(rentry->res);
 			pdata->mmio_base = ioremap(rentry->res->start,
 						   pdata->mmio_size);
-			if (!pdata->mmio_base)
-				goto err_out;
 			break;
 		}
 
 	acpi_dev_free_resource_list(&resource_list);
 
+	if (!pdata->mmio_base) {
+		ret = -ENOMEM;
+		goto err_out;
+	}
+
 	pdata->dev_desc = dev_desc;
 
 	if (dev_desc->setup)


Patches currently in stable-queue which might be from rafael.j.wysocki@intel.com are

queue-4.1/acpi-pci-fix-regressions-caused-by-resource_size_t-overflow-with-32-bit-kernel.patch
queue-4.1/acpica-tables-fix-an-issue-that-facs-initialization-is-performed-twice.patch
queue-4.1/acpi-lpss-fix-up-acpi_lpss_create_device.patch
queue-4.1/acpi-pnp-reserve-acpi-resources-at-the-fs_initcall_sync-stage.patch
queue-4.1/acpi-resources-free-memory-on-error-in-add_region_before.patch
queue-4.1/acpica-tables-enable-default-64-bit-fadt-addresses-favor.patch
queue-4.1/acpica-tables-enable-both-32-bit-and-64-bit-facs.patch

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2015-07-31  0:42 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-07-31  0:42 Patch "ACPI / LPSS: Fix up acpi_lpss_create_device()" has been added to the 4.1-stable tree gregkh

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).