diff options
author | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2021-06-17 16:57:07 +0300 |
---|---|---|
committer | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2021-06-17 16:57:07 +0300 |
commit | 5f4ce26078fde9cd406c008ba35e31bbb26a23a1 (patch) | |
tree | 02b429ff48fc0b3518058f8d011239f2ac3c4e0b /drivers/hwmon | |
parent | c6a493a1b603ed216ce69d1faac3f0ddc6a2f8eb (diff) | |
download | linux-5f4ce26078fde9cd406c008ba35e31bbb26a23a1.tar.xz |
ACPI: scan: Fix race related to dropping dependencies
If acpi_add_single_object() runs concurrently with respect to
acpi_scan_clear_dep() which deletes a dependencies list entry where
the device being added is the consumer, the device's dep_unmet
counter may not be updated to reflect that change.
Namely, if the dependencies list entry is deleted right after
calling acpi_scan_dep_init() and before calling acpi_device_add(),
acpi_scan_clear_dep() will not find the device object corresponding
to the consumer device ACPI handle and it will not update its
dep_unmet counter to reflect the deletion of the list entry.
Consequently, the dep_unmet counter of the device will never
become zero going forward which may prevent it from being
completely enumerated.
To address this problem, modify acpi_add_single_object() to run
acpi_tie_acpi_dev(), to attach the ACPI device object created by it
to the corresponding ACPI namespace node, under acpi_dep_list_lock
along with acpi_scan_dep_init() whenever the latter is called.
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Diffstat (limited to 'drivers/hwmon')
0 files changed, 0 insertions, 0 deletions