Re: [PATCH v1] PM: sleep: core: Clear device async state upfront during suspend

From: Rafael J. Wysocki

Date: Wed Feb 04 2026 - 09:00:36 EST


On Wednesday, February 4, 2026 2:37:20 PM CET Ulf Hansson wrote:
> On Tue, 3 Feb 2026 at 21:37, Rafael J. Wysocki <rafael@xxxxxxxxxx> wrote:
> >
> > From: Rafael J. Wysocki <rafael.j.wysocki@xxxxxxxxx>
> >
> > In all of the system suspend transition phases, async state of all
> > devices needs to be cleared before starting async processing for any of
> > them because the latter may race with power.work_in_progress updates for
> > the device's parent or suppliers and if it touches bit fields from the
> > same group (for example, power.must_resume or power.wakeup_path), bit
> > field corruption is possible.
> >
> > Rearrange the code accordingly.
> >
> > Fixes: aa7a9275ab81 ("PM: sleep: Suspend async parents after suspending children")
> > Fixes: 443046d1ad66 ("PM: sleep: Make suspend of devices more asynchronous")
> > Reported-by: Xuewen Yan <xuewen.yan@xxxxxxxxxx>
> > Closes: https://lore.kernel.org/linux-pm/20260203063459.12808-1-xuewen.yan@xxxxxxxxxx/
> > Cc: All applicable <stable@xxxxxxxxxxxxxxx>
> > Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@xxxxxxxxx>
>
> Looks good to me!
>
> Reviewed-by: Ulf Hansson <ulf.hansson@xxxxxxxxxx>

Thanks!

In the meantime though I have decided to commit the patch below instead
because it is simpler and basically no overhead.

Please let me know if you have any concerns regarding it.

---