Currently, the PF_FREEZE process flag is used to indicate that the process
should enter the refrigerator as soon as possible. Unfortunately it is set by
the freezer while the process may be changing its flags for another reason
and this may lead to a race between the freezer and the process itself
Change the ordering of code in kernel/power/user.c so that device_suspend()
is called before disable_nonboot_cpus() and device_resume() is called after
enable_nonboot_cpus().
The changes here only affect the userland interface of swsusp.
Signed-off-by: Rafael J. Wysocki <[EMAIL PROTECTED]>
---
k
Change the ordering of code in kernel/power/disk.c so that
device_suspend() is called before disable_nonboot_cpus() and
platform_finish() is called after enable_nonboot_cpus() and before
device_resume().
The changes here only affect the built-in swsusp.
Signed-off-by: Rafael J. Wysocki <[EMAIL PR
Hi,
The discussion in a recent thread on Linux-PM has indicated that it's
necessary to call pm_ops->finish() before devce_resume(),
but enable_nonboot_cpus() has to be called before pm_ops->finish()
(cf. http://lists.osdl.org/pipermail/linux-pm/2006-November/004164.html).
For consistency, it seems
Change the ordering of code in kernel/power/main.c so that device_suspend()
is called before disable_nonboot_cpus() and pm_ops->finish() is called after
enable_nonboot_cpus() and before device_resume().
Signed-off-by: Rafael J. Wysocki <[EMAIL PROTECTED]>
---
kernel/power/main.c | 34 ++
Since pm_ops->finish() has to be called after enable_nonboot_cpus() and before
device_resume(), from the userland interface perspective it should be treated
as a part of the atomic suspend and resume operations. For this reason we
need two additional ioctls to be called instead of ATOMIC_SNAPSHOT
Hi!
> The discussion in a recent thread on Linux-PM has indicated that it's
> necessary to call pm_ops->finish() before devce_resume(),
> but enable_nonboot_cpus() has to be called before pm_ops->finish()
> (cf. http://lists.osdl.org/pipermail/linux-pm/2006-November/004164.html).
> For consistency
Hi!
> Currently, the PF_FREEZE process flag is used to indicate that the process
> should enter the refrigerator as soon as possible. Unfortunately it is set by
> the freezer while the process may be changing its flags for another reason
> and this may lead to a race between the freezer and the p