diff options
author | Srivatsa S. Bhat <srivatsa.bhat@linux.vnet.ibm.com> | 2011-11-03 00:59:25 +0100 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2012-01-12 11:35:46 -0800 |
commit | 4ae84455f98af3b3c3a23f8b6458fcefc9ff62bf (patch) | |
tree | 84c872ec590114cadc912adeb495878d50f9098b /drivers/scsi/mpt2sas | |
parent | 81aaa36dde03db855fb233382c7667f98ac12659 (diff) | |
download | kernel_samsung_smdk4412-4ae84455f98af3b3c3a23f8b6458fcefc9ff62bf.zip kernel_samsung_smdk4412-4ae84455f98af3b3c3a23f8b6458fcefc9ff62bf.tar.gz kernel_samsung_smdk4412-4ae84455f98af3b3c3a23f8b6458fcefc9ff62bf.tar.bz2 |
PM / Sleep: Fix race between CPU hotplug and freezer
commit 79cfbdfa87e84992d509e6c1648a18e1d7e68c20 upstream.
The CPU hotplug notifications sent out by the _cpu_up() and _cpu_down()
functions depend on the value of the 'tasks_frozen' argument passed to them
(which indicates whether tasks have been frozen or not).
(Examples for such CPU hotplug notifications: CPU_ONLINE, CPU_ONLINE_FROZEN,
CPU_DEAD, CPU_DEAD_FROZEN).
Thus, it is essential that while the callbacks for those notifications are
running, the state of the system with respect to the tasks being frozen or
not remains unchanged, *throughout that duration*. Hence there is a need for
synchronizing the CPU hotplug code with the freezer subsystem.
Since the freezer is involved only in the Suspend/Hibernate call paths, this
patch hooks the CPU hotplug code to the suspend/hibernate notifiers
PM_[SUSPEND|HIBERNATE]_PREPARE and PM_POST_[SUSPEND|HIBERNATE] to prevent
the race between CPU hotplug and freezer, thus ensuring that CPU hotplug
notifications will always be run with the state of the system really being
what the notifications indicate, _throughout_ their execution time.
Signed-off-by: Srivatsa S. Bhat <srivatsa.bhat@linux.vnet.ibm.com>
Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/scsi/mpt2sas')
0 files changed, 0 insertions, 0 deletions