Skip to content

Commit

Permalink
rcupreempt: fix hibernate/resume in presence of PREEMPT_RCU and hotplug
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Paul E. McKenney authored and Ingo Molnar committed Feb 29, 2008
1 parent 076d84b commit ae77886
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion kernel/rcupreempt.c
Original file line number Diff line number Diff line change
Expand Up @@ -918,8 +918,9 @@ void rcu_offline_cpu(int cpu)
* fix.
*/

local_irq_save(flags);
rdp = RCU_DATA_ME();
spin_lock_irqsave(&rdp->lock, flags);
spin_lock(&rdp->lock);
*rdp->nexttail = list;
if (list)
rdp->nexttail = tail;
Expand Down

0 comments on commit ae77886

Please sign in to comment.