This is a note to let you know that I've just added the patch titled PM: runtime: Fix ordering in pm_runtime_get_suppliers() to the 5.11-stable tree which can be found at: http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary The filename of the patch is: pm-runtime-fix-ordering-in-pm_runtime_get_suppliers.patch and it can be found in the queue-5.11 subdirectory. If you, or anyone else, feels it should not be added to the stable tree, please let <stable@xxxxxxxxxxxxxxx> know about it. >From c0c33442f7203704aef345647e14c2fb86071001 Mon Sep 17 00:00:00 2001 From: Adrian Hunter <adrian.hunter@xxxxxxxxx> Date: Fri, 26 Mar 2021 12:56:18 +0200 Subject: PM: runtime: Fix ordering in pm_runtime_get_suppliers() From: Adrian Hunter <adrian.hunter@xxxxxxxxx> commit c0c33442f7203704aef345647e14c2fb86071001 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: 4c06c4e6cf63 ("driver core: Fix possible supplier PM-usage counter imbalance") Signed-off-by: Adrian Hunter <adrian.hunter@xxxxxxxxx> Cc: 5.1+ <stable@xxxxxxxxxxxxxxx> # 5.1+ Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@xxxxxxxxx> Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx> --- drivers/base/power/runtime.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/drivers/base/power/runtime.c +++ b/drivers/base/power/runtime.c @@ -1690,8 +1690,8 @@ void pm_runtime_get_suppliers(struct 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); Patches currently in stable-queue which might be from adrian.hunter@xxxxxxxxx are queue-5.11/pm-runtime-fix-race-getting-putting-suppliers-at-probe.patch queue-5.11/pm-runtime-fix-ordering-in-pm_runtime_get_suppliers.patch