diff options
| author | Paul E. McKenney <paulmck@linux.vnet.ibm.com> | 2008-02-27 19:21:10 -0500 |
|---|---|---|
| committer | Ingo Molnar <mingo@elte.hu> | 2008-02-29 14:21:13 -0500 |
| commit | ae778869ae4549628b9e83efe958c3aaa63ed1b9 (patch) | |
| tree | 97e36cffbc042f0982bfc8c3d17572c3329b1578 /kernel | |
| parent | 076d84bbdb396360d16aaa108c55aa1e24ad47a3 (diff) | |
rcupreempt: fix hibernate/resume in presence of PREEMPT_RCU and hotplug
This fixes a oops encountered when doing hibernate/resume in presence of
PREEMPT_RCU.
The problem was that the code failed to disable preemption when
accessing a per-CPU variable. This is OK when called from code that
already has preemption disabled, but such is not the case from the
suspend/resume code path.
Reported-by: Dave Young <hidave.darkstar@gmail.com>
Tested-by: Dave Young <hidave.darkstar@gmail.com>
Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'kernel')
| -rw-r--r-- | kernel/rcupreempt.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/kernel/rcupreempt.c b/kernel/rcupreempt.c index c7c52096df48..845abcd472b0 100644 --- a/kernel/rcupreempt.c +++ b/kernel/rcupreempt.c | |||
| @@ -918,8 +918,9 @@ void rcu_offline_cpu(int cpu) | |||
| 918 | * fix. | 918 | * fix. |
| 919 | */ | 919 | */ |
| 920 | 920 | ||
| 921 | local_irq_save(flags); | ||
| 921 | rdp = RCU_DATA_ME(); | 922 | rdp = RCU_DATA_ME(); |
| 922 | spin_lock_irqsave(&rdp->lock, flags); | 923 | spin_lock(&rdp->lock); |
| 923 | *rdp->nexttail = list; | 924 | *rdp->nexttail = list; |
| 924 | if (list) | 925 | if (list) |
| 925 | rdp->nexttail = tail; | 926 | rdp->nexttail = tail; |
