public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] Fix hibernate/resume in presence of PREEMPT_RCU and hotplug
@ 2008-02-28  0:21 Paul E. McKenney
  2008-02-28  5:05 ` Gautham R Shenoy
  2008-02-28 19:51 ` [PATCH] Remove never-migrates assumption from rcu_process_callbacks() Paul E. McKenney
  0 siblings, 2 replies; 7+ messages in thread
From: Paul E. McKenney @ 2008-02-28  0:21 UTC (permalink / raw)
  To: linux-kernel
  Cc: hidave.darkstar, akpm, fzu, mingo, ego, dipankar, niv, dvhltc

Hello!

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>
---

 rcupreempt.c |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff -urpNa -X dontdiff linux-2.6.25-rc3/kernel/rcupreempt.c linux-2.6.25-rc3-rcuoffline/kernel/rcupreempt.c
--- linux-2.6.25-rc3/kernel/rcupreempt.c	2008-02-26 16:58:43.000000000 -0800
+++ linux-2.6.25-rc3-rcuoffline/kernel/rcupreempt.c	2008-02-26 17:04:17.000000000 -0800
@@ -702,8 +702,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;

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2008-02-28 23:33 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-02-28  0:21 [PATCH] Fix hibernate/resume in presence of PREEMPT_RCU and hotplug Paul E. McKenney
2008-02-28  5:05 ` Gautham R Shenoy
2008-02-28 19:43   ` Paul E. McKenney
2008-02-28 19:51 ` [PATCH] Remove never-migrates assumption from rcu_process_callbacks() Paul E. McKenney
2008-02-28 19:53   ` Ingo Molnar
2008-02-28 19:54     ` Ingo Molnar
2008-02-28 23:10       ` Paul E. McKenney

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox