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)
commit0cab893f409c53634d0d818fa414641cbcdb0dab
treee34ab8024ba7dc54187156289ca8cd9d12c8636e
parent1e28eed17697bcf343c6743f0028cc3b5dd88bf0
Revert "PM: runtime: Update device status before letting suppliers suspend"

Revert commit 44cc89f76464 ("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: 44cc89f76464 ("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