linux/kernel/power
Rafael J. Wysocki 181e9bdef3 PM / Hibernate: Fix s2disk regression related to freezing workqueues
Commit 2aede851dd

  PM / Hibernate: Freeze kernel threads after preallocating memory

introduced a mechanism by which kernel threads were frozen after
the preallocation of hibernate image memory to avoid problems with
frozen kernel threads not responding to memory freeing requests.
However, it overlooked the s2disk code path in which the
SNAPSHOT_CREATE_IMAGE ioctl was run directly after SNAPSHOT_FREE,
which caused freeze_workqueues_begin() to BUG(), because it saw
that worqueues had been already frozen.

Although in principle this issue might be addressed by removing
the relevant BUG_ON() from freeze_workqueues_begin(), that would
reintroduce the very problem that commit 2aede851dd
attempted to avoid into that particular code path.  For this reason,
to fix the issue at hand, introduce thaw_kernel_threads() and make
the SNAPSHOT_FREE ioctl execute it.

Special thanks to Srivatsa S. Bhat for detailed analysis of the
problem.

Reported-and-tested-by: Jiri Slaby <jslaby@suse.cz>
Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
Acked-by: Srivatsa S. Bhat <srivatsa.bhat@linux.vnet.ibm.com>
Cc: stable@kernel.org
2012-01-29 20:35:52 +01:00
..
block_io.c
console.c
hibernate.c PM / Sleep: Replace mutex_[un]lock(&pm_mutex) with [un]lock_system_sleep() 2011-12-08 23:22:29 +01:00
Kconfig
main.c PM / Sleep: Replace mutex_[un]lock(&pm_mutex) with [un]lock_system_sleep() 2011-12-08 23:22:29 +01:00
Makefile
power.h PM / Hibernate: Thaw processes in SNAPSHOT_CREATE_IMAGE ioctl test path 2011-12-06 22:07:59 +01:00
poweroff.c
process.c PM / Hibernate: Fix s2disk regression related to freezing workqueues 2012-01-29 20:35:52 +01:00
qos.c
snapshot.c PM / Hibernate: Correct additional pages number calculation 2012-01-19 23:23:10 +01:00
suspend_test.c
suspend.c PM / Sleep: Replace mutex_[un]lock(&pm_mutex) with [un]lock_system_sleep() 2011-12-08 23:22:29 +01:00
swap.c PM / Hibernate: Drop the check of swap space size for compressed image 2012-01-14 00:41:37 +01:00
user.c PM / Hibernate: Fix s2disk regression related to freezing workqueues 2012-01-29 20:35:52 +01:00