From: "Paul E. McKenney" <paulmck@linux.vnet.ibm.com>
To: Gautham R Shenoy <ego@in.ibm.com>
Cc: linux-kernel@vger.kernel.org, hidave.darkstar@gmail.com,
akpm@linux-foundation.org, fzu@wemgehoertderstaat.de,
mingo@elte.hu, dipankar@in.ibm.com, niv@us.ibm.com,
dvhltc@us.ibm.com
Subject: Re: [PATCH] Fix hibernate/resume in presence of PREEMPT_RCU and hotplug
Date: Thu, 28 Feb 2008 11:43:23 -0800 [thread overview]
Message-ID: <20080228194323.GI15409@linux.vnet.ibm.com> (raw)
In-Reply-To: <20080228050507.GA31289@in.ibm.com>
On Thu, Feb 28, 2008 at 10:35:08AM +0530, Gautham R Shenoy wrote:
> On Wed, Feb 27, 2008 at 04:21:10PM -0800, Paul E. McKenney wrote:
> > 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.
>
> Well, rcu_offline_cpu() is called from the cpu-offline callback path, and
> AFAICS, it doesn't disable preemption.
>
> I wonder how we're seeing this only now! Indeed a good catch!
I wonder as well. In fact there is (at least) one other such bug,
submitting patch separately. :-/
Thanx, Paul
> Reviewed-by: Gautham R Shenoy <ego@in.ibm.com>
>
> >
> > 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;
>
> --
> Thanks and Regards
> gautham
next prev parent reply other threads:[~2008-02-28 19:52 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
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 [this message]
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20080228194323.GI15409@linux.vnet.ibm.com \
--to=paulmck@linux.vnet.ibm.com \
--cc=akpm@linux-foundation.org \
--cc=dipankar@in.ibm.com \
--cc=dvhltc@us.ibm.com \
--cc=ego@in.ibm.com \
--cc=fzu@wemgehoertderstaat.de \
--cc=hidave.darkstar@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=niv@us.ibm.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox