linux/drivers/pnp
Rafael J. Wysocki a6b5e88c0e ACPI / PNP: Do not crash due to stale pointer use during system resume
During resume from system suspend the 'data' field of
struct pnp_dev in pnpacpi_set_resources() may be a stale pointer,
due to removal of the associated ACPI device node object in the
previous suspend-resume cycle.  This happens, for example, if a
dockable machine is booted in the docking station and then suspended
and resumed and suspended again.  If that happens,
pnpacpi_build_resource_template() called from pnpacpi_set_resources()
attempts to use that pointer and crashes.

However, pnpacpi_set_resources() actually checks the device's ACPI
handle, attempts to find the ACPI device node object attached to it
and returns an error code if that fails, so in fact it knows what the
correct value of dev->data should be.  Use this observation to update
dev->data with the correct value if necessary and dump a call trace
if that's the case (once).

We still need to fix the root cause of this issue, but preventing
systems from crashing because of it is an improvement too.

Reported-and-tested-by: Zdenek Kabelac <zdenek.kabelac@gmail.com>
References: https://bugzilla.kernel.org/show_bug.cgi?id=51071
Cc: <stable@vger.kernel.org>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
2012-11-30 13:05:05 +01:00
..
isapnp Merge branch 'pnp' into release 2011-01-12 04:59:44 -05:00
pnpacpi ACPI / PNP: Do not crash due to stale pointer use during system resume 2012-11-30 13:05:05 +01:00
pnpbios Remove all #inclusions of asm/system.h 2012-03-28 18:30:03 +01:00
base.h pnp: only assign IORESOURCE_DMA if CONFIG_ISA_DMA_API is enabled 2011-03-22 17:44:16 -07:00
card.c Fix common misspellings 2011-03-31 11:26:23 -03:00
core.c Merge branch 'pnp' into release 2011-01-12 04:59:44 -05:00
driver.c PNP / ACPI: Use DEVICE_ACPI_HANDLE() for device ACPI handle access 2011-01-11 15:20:40 -05:00
interface.c PNPACPI: add bus number support 2010-03-14 20:08:38 -04:00
Kconfig PNP: remove old CONFIG_PNP_DEBUG option 2008-10-10 23:35:33 -04:00
Makefile PNP: Compile all pnp built-in stuff in one module namespace 2010-10-27 02:23:44 -04:00
manager.c pnp: only assign IORESOURCE_DMA if CONFIG_ISA_DMA_API is enabled 2011-03-22 17:44:16 -07:00
quirks.c PNP: work around Dell 1536/1546 BIOS MMCONFIG bug that breaks USB 2012-01-06 12:11:20 -08:00
resource.c pnp: only assign IORESOURCE_DMA if CONFIG_ISA_DMA_API is enabled 2011-03-22 17:44:16 -07:00
support.c PNPACPI: add bus number support 2010-03-14 20:08:38 -04:00
system.c vsprintf: use %pR, %pr instead of %pRt, %pRf 2009-11-04 13:06:41 -08:00