Forum | Documentation | Website | Blog

Skip to content
Snippets Groups Projects
Commit 6d815092 authored by Rafael J. Wysocki's avatar Rafael J. Wysocki Committed by Greg Kroah-Hartman
Browse files

ACPI / PNP: Fix acpi_pnp_match()


commit b6328a07 upstream.

The acpi_pnp_match() function is used for finding the ACPI device
object that should be associated with the given PNP device.
Unfortunately, the check used by that function is not strict enough
and may cause success to be returned for a wrong ACPI device object.

To fix that, use the observation that the pointer to the ACPI
device object in question is already stored in the data field
in struct pnp_dev, so acpi_pnp_match() can simply use that
field to do its job.

This problem was uncovered in 3.14 by commit 202317a5 (ACPI / scan:
Add acpi_device objects for all device nodes in the namespace).

Fixes: 202317a5 (ACPI / scan: Add acpi_device objects for all device nodes in the namespace)
Reported-and-tested-by: default avatarVinson Lee <vlee@twopensource.com>
Signed-off-by: default avatarRafael J. Wysocki <rafael.j.wysocki@intel.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent dbb306f8
No related merge requests found
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment