Skip to content

Commit fa58e4f

Browse files
committed
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
2 parents 4d28e28 + e246518 commit fa58e4f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

drivers/base/power/main.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -675,7 +675,7 @@ static void dpm_async_resume_subordinate(struct device *dev, async_func_t func)
675675
idx = device_links_read_lock();
676676

677677
/* Start processing the device's "async" consumers. */
678-
list_for_each_entry_rcu(link, &dev->links.consumers, s_node)
678+
list_for_each_entry_rcu_locked(link, &dev->links.consumers, s_node)
679679
if (READ_ONCE(link->status) != DL_STATE_DORMANT)
680680
dpm_async_with_cleanup(link->consumer, func);
681681

@@ -1330,7 +1330,7 @@ static void dpm_async_suspend_superior(struct device *dev, async_func_t func)
13301330
idx = device_links_read_lock();
13311331

13321332
/* Start processing the device's "async" suppliers. */
1333-
list_for_each_entry_rcu(link, &dev->links.suppliers, c_node)
1333+
list_for_each_entry_rcu_locked(link, &dev->links.suppliers, c_node)
13341334
if (READ_ONCE(link->status) != DL_STATE_DORMANT)
13351335
dpm_async_with_cleanup(link->supplier, func);
13361336

0 commit comments

Comments
 (0)