Commit 5682c8f9 authored by Adrian Hunter's avatar Adrian Hunter Committed by Zheng Zengkai
Browse files

PM: runtime: Fix ordering in pm_runtime_get_suppliers()



stable inclusion
from stable-5.10.28
commit cc038ab785a836677bfae8756e24e1e9ace00632
bugzilla: 51779

--------------------------------

commit c0c33442 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: 4c06c4e6 ("driver core: Fix possible supplier PM-usage counter imbalance")
Signed-off-by: default avatarAdrian Hunter <adrian.hunter@intel.com>
Cc: 5.1+ <stable@vger.kernel.org> # 5.1+
Signed-off-by: default avatarRafael J. Wysocki <rafael.j.wysocki@intel.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: default avatarChen Jun <chenjun102@huawei.com>
Acked-by: default avatar  Weilong Chen <chenweilong@huawei.com>
Signed-off-by: default avatarZheng Zengkai <zhengzengkai@huawei.com>
parent 0abba3fd
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment