]> git.baikalelectronics.ru Git - kernel.git/commit
Revert "PM: runtime: Update device status before letting suppliers suspend"
authorRafael J. Wysocki <rafael.j.wysocki@intel.com>
Fri, 19 Mar 2021 14:47:25 +0000 (15:47 +0100)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Fri, 19 Mar 2021 15:35:47 +0000 (16:35 +0100)
commit0d5f9906a2056705c1481928d2ca10936621d414
treee34ab8024ba7dc54187156289ca8cd9d12c8636e
parent4f0be5a267ce1c80d673727864ba230cec2dd40b
Revert "PM: runtime: Update device status before letting suppliers suspend"

Revert commit ed70122b7be4 ("PM: runtime: Update device status
before letting suppliers suspend") that introduced a race condition
into __rpm_callback() which allowed a concurrent rpm_resume() to
run and resume the device prematurely after its status had been
changed to RPM_SUSPENDED by __rpm_callback().

Fixes: ed70122b7be4 ("PM: runtime: Update device status before letting suppliers suspend")
Link: https://lore.kernel.org/linux-pm/24dfb6fc-5d54-6ee2-9195-26428b7ecf8a@intel.com/
Reported-by: Adrian Hunter <adrian.hunter@intel.com>
Cc: 4.10+ <stable@vger.kernel.org> # 4.10+
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Reviewed-by: Ulf Hansson <ulf.hansson@linaro.org>
drivers/base/power/runtime.c