Skip to content

PM: cpu: Restore the RCU grace period to cpu_pm_unregister_notifier()

Bradley Morgan linux-pm lkml 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest2 patches 5 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/2clocksource/drivers/timer-ti-dm: Unregister CPU PM notifier outside of the timer lockdrivers/clocksource/timer-ti-dm.c+6 -33 replies
2/2PM: cpu: Restore synchronize_rcu() to cpu_pm_unregister_notifier()kernel/cpu_pm.c+8 -12 replies

Reviews trailers per patch

1 of 2 patches has a Reviewed-by or Acked-by.

PatchRafael J. Wysocki (Intel)
1/2
2/2A-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v1 thread

Cover letter [PATCH 0/2] PM: cpu: Restore the RCU grace period to cpu_pm_unregister_notifier()

Since commit b2f6662ac08d ("PM: cpu: Make notifier chain use a raw_spinlock_t") cpu_pm_unregister_notifier() no longer waits for an RCU grace period, but cpu_pm_notify() still walks the chain with only rcu_read_lock() held. A driver that frees its notifier block right after unregistering can race with a concurrent walker.

Patch 1 moves the one caller that unregisters from atomic context out from under its spinlock, patch 2 restores the grace period.

Bradley Morgan (2):
clocksource/drivers/timer-ti-dm: Unregister CPU PM notifier outside of
the timer lock
PM: cpu: Restore synchronize_rcu() to cpu_pm_unregister_notifier()

 drivers/clocksource/timer-ti-dm.c | 9 ++++++---
 kernel/cpu_pm.c                   | 9 ++++++++-
 2 files changed, 14 insertions(+), 4 deletions(-)
Signature · 1 line
2.47.3