mirror of
https://github.com/torvalds/linux.git
synced 2026-09-28 20:12:01 +02:00
Power management fix for 7.3-rc5
Address a hibernation regression introduced during the 7.2 development cycle that causes the image memory preallocation to deadlock if it depends on frozen kernel threads (Florian Schmaus). -----BEGIN PGP SIGNATURE----- iQFGBAABCAAwFiEEcM8Aw/RY0dgsiRUR7l+9nS/U47UFAmq2mDESHHJqd0Byand5 c29ja2kubmV0AAoJEO5fvZ0v1OO1wFAH/2e9iz++Qjb9SODpGX/2Fz07qb4SBRCP Zf0r74G7qfoPczcLuiKu8irb1FSvlwr1nlcygWcF0gYLg9TJCaaQ7JIxHL/9ePV0 lbINk+4ozu5S6AbMh7O5wpv3n+nwBtg1wZZP3kSY4hxQ5zymACuEzwBTGT9vfQVA GpkrasgQVTOyt1gWAO8Ak3WX3z1EaBqzl8DsCm/75PVq2Wy1I801JagtYT6KArf6 kqH19SdiihrTl+2k/k2Vvc14H9XYfXab77ShWv1JgKF7X1QqaO8QWVFQulj0bpgc LLSlpiQXqBYfz469bPGyS2U6tyFioynqoiWQfdxC6zBGcHv1Jl3LdDg= =mfRN -----END PGP SIGNATURE----- Merge tag 'pm-7.3-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm Pull power management fix from Rafael Wysocki: "Address a hibernation regression introduced during the 7.2 development cycle that causes the image memory preallocation to deadlock if it depends on frozen kernel threads (Florian Schmaus)" * tag 'pm-7.3-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm: PM: hibernate: Freeze kernel threads after image preallocation
This commit is contained in:
commit
4ba51ef66a
|
|
@ -408,9 +408,18 @@ int hibernation_snapshot(int platform_mode)
|
|||
if (error)
|
||||
goto Close;
|
||||
|
||||
error = dpm_prepare(PMSG_FREEZE);
|
||||
if (error)
|
||||
goto Complete;
|
||||
|
||||
/* Preallocate image memory before freezing kernel threads and shutting down devices. */
|
||||
error = hibernate_preallocate_memory();
|
||||
if (error)
|
||||
goto Complete;
|
||||
|
||||
error = freeze_kernel_threads();
|
||||
if (error)
|
||||
goto Close;
|
||||
goto Cleanup;
|
||||
|
||||
if (hibernation_test(TEST_FREEZER)) {
|
||||
|
||||
|
|
@ -422,15 +431,6 @@ int hibernation_snapshot(int platform_mode)
|
|||
goto Thaw;
|
||||
}
|
||||
|
||||
error = dpm_prepare(PMSG_FREEZE);
|
||||
if (error)
|
||||
goto Complete;
|
||||
|
||||
/* Preallocate image memory before shutting down devices. */
|
||||
error = hibernate_preallocate_memory();
|
||||
if (error)
|
||||
goto Complete;
|
||||
|
||||
console_suspend_all();
|
||||
pm_restrict_gfp_mask();
|
||||
|
||||
|
|
@ -464,10 +464,12 @@ int hibernation_snapshot(int platform_mode)
|
|||
platform_end(platform_mode);
|
||||
return error;
|
||||
|
||||
Complete:
|
||||
dpm_complete(PMSG_RECOVER);
|
||||
Thaw:
|
||||
thaw_kernel_threads();
|
||||
Cleanup:
|
||||
swsusp_free();
|
||||
Complete:
|
||||
dpm_complete(PMSG_RECOVER);
|
||||
goto Close;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user