Pierre-Louis Bossart 23583f7795 ACPI / property: fix handling of data_nodes in acpi_get_next_subnode()
When the DSDT tables expose devices with subdevices and a set of
hierarchical _DSD properties, the data returned by
acpi_get_next_subnode() is incorrect, with the results suggesting a bad
pointer assignment. The parser works fine with device_nodes or
data_nodes, but not with a combination of the two.

The problem is traced to an invalid pointer used when jumping from
handling device_nodes to data nodes. The existing code looks for data
nodes below the last subdevice found instead of the common root. Fix
by forcing the acpi_device pointer to be derived from the same fwnode
for the two types of subnodes.

This same problem of handling device and data nodes was already fixed
in a similar way by 'commit bf4703fdd166 ("ACPI / property: fix data
node parsing in acpi_get_next_subnode()")' but broken later by 'commit
34055190b19 ("ACPI / property: Add fwnode_get_next_child_node()")', so
this should probably go to linux-stable all the way to 4.12

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
2019-05-01 10:06:08 +02:00
..
2019-03-04 11:16:35 +01:00
2019-01-11 10:02:59 +00:00
2019-03-16 13:05:32 -07:00
2019-02-18 13:27:15 +10:00
2018-06-05 10:08:27 -07:00
2016-04-27 23:42:57 +02:00
2018-09-27 18:29:00 +02:00
2016-01-04 22:10:30 +01:00
2019-03-16 13:05:32 -07:00
2018-12-18 10:51:16 +01:00