2
0
mirror of git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git synced 2025-09-04 20:19:47 +08:00

Power management fix for 6.17-rc4

Add missing locking annotations to two recently introduced
 list_for_each_entry_rcu() loops in the core device suspend/resume
 code (Johannes Berg)
 -----BEGIN PGP SIGNATURE-----
 
 iQFGBAABCAAwFiEEcM8Aw/RY0dgsiRUR7l+9nS/U47UFAmiws2ESHHJqd0Byand5
 c29ja2kubmV0AAoJEO5fvZ0v1OO1hSIIAI8UeQnihDtPYR0bklyzENW/g17Du/4M
 UZPxd50YB4xSofLhHDZCf214Yg5vihV3Hdj51XkDn+Wyd2HTYC5GW/qLcUL9gpLj
 MflA6O0ZtYpAE3bByK+XI4Wwas05h/LuF63ty8i+2zrS7NV7EaFa1+3Hj7wgQ7wZ
 QGsaTdet3kxgJa/KbLOkzXayrLiAk4OtrFpABu+8cjzHi1wDg8on00+zW1FN5b9U
 f14jsdds+as1usw6Gf8lSSUgtLNQ/kQ41Btg2naG4B6TD9N9WpVwkx1TCrXcDj2E
 Wff/dTSfBU8As8D9ZPr4HOk9tmFmdwcFareT4wRBljbys6ixgYvxGX8=
 =9Avh
 -----END PGP SIGNATURE-----

Merge tag 'pm-6.17-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm

Pull power management fix from Rafael Wysocki:
 "Add missing locking annotations to two recently introduced
  list_for_each_entry_rcu() loops in the core device suspend/resume
  code (Johannes Berg)"

* tag 'pm-6.17-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm:
  PM: sleep: annotate RCU list iterations
This commit is contained in:
Linus Torvalds 2025-08-28 16:34:32 -07:00
commit fa58e4f6e1

View File

@ -675,7 +675,7 @@ static void dpm_async_resume_subordinate(struct device *dev, async_func_t func)
idx = device_links_read_lock();
/* Start processing the device's "async" consumers. */
list_for_each_entry_rcu(link, &dev->links.consumers, s_node)
list_for_each_entry_rcu_locked(link, &dev->links.consumers, s_node)
if (READ_ONCE(link->status) != DL_STATE_DORMANT)
dpm_async_with_cleanup(link->consumer, func);
@ -1330,7 +1330,7 @@ static void dpm_async_suspend_superior(struct device *dev, async_func_t func)
idx = device_links_read_lock();
/* Start processing the device's "async" suppliers. */
list_for_each_entry_rcu(link, &dev->links.suppliers, c_node)
list_for_each_entry_rcu_locked(link, &dev->links.suppliers, c_node)
if (READ_ONCE(link->status) != DL_STATE_DORMANT)
dpm_async_with_cleanup(link->supplier, func);