mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-09-13 22:25:03 +00:00
PM: runtime: Fix ordering in pm_runtime_get_suppliers()
commitc0c33442f7
upstream. rpm_active indicates how many times the supplier usage_count has been incremented. Consequently it must be updated after pm_runtime_get_sync() of the supplier, not before. Fixes:4c06c4e6cf
("driver core: Fix possible supplier PM-usage counter imbalance") Signed-off-by: Adrian Hunter <adrian.hunter@intel.com> Cc: 5.1+ <stable@vger.kernel.org> # 5.1+ Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
72a667681c
commit
07b19a118d
1 changed files with 1 additions and 1 deletions
|
@ -1663,8 +1663,8 @@ void pm_runtime_get_suppliers(struct device *dev)
|
|||
device_links_read_lock_held())
|
||||
if (link->flags & DL_FLAG_PM_RUNTIME) {
|
||||
link->supplier_preactivated = true;
|
||||
refcount_inc(&link->rpm_active);
|
||||
pm_runtime_get_sync(link->supplier);
|
||||
refcount_inc(&link->rpm_active);
|
||||
}
|
||||
|
||||
device_links_read_unlock(idx);
|
||||
|
|
Loading…
Reference in a new issue