Re: [PATCH 04/24] PM: hibernate: move finding the resume device out of software_resume

From: Vlastimil Babka
Date: Thu Aug 03 2023 - 04:31:56 EST


On 5/31/23 14:55, Christoph Hellwig wrote:
> software_resume can be called either from an init call in the boot code,
> or from sysfs once the system has finished booting, and the two
> invocation methods this can't race with each other.
>
> For the latter case we did just parse the suspend device manually, while
> the former might not have one. Split software_resume so that the search
> only happens for the boot case, which also means the special lockdep
> nesting annotation can go away as the system transition mutex can be
> taken a little later and doesn't have the sysfs locking nest inside it.
>
> Signed-off-by: Christoph Hellwig <hch@xxxxxx>
> Acked-by: Rafael J. Wysocki <rafael@xxxxxxxxxx>

This caused a regression for me in 6.5-rc1+, fix below.

----8<----