提交 ae778869 编写于 作者: P Paul E. McKenney 提交者: Ingo Molnar

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: NDave Young <hidave.darkstar@gmail.com>
Tested-by: NDave Young <hidave.darkstar@gmail.com>
Signed-off-by: NPaul E. McKenney <paulmck@linux.vnet.ibm.com>
Signed-off-by: NIngo Molnar <mingo@elte.hu>
上级 076d84bb
......@@ -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;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册