From: Li Zhong <zhong@linux.vnet.ibm.com>
To: Anton Blanchard <anton@samba.org>
Cc: Paul Mackerras <paulus@samba.org>,
Benjamin Herrenschmidt <benh@au1.ibm.com>,
PowerPC email list <linuxppc-dev@lists.ozlabs.org>
Subject: Re: [RFC PATCH] Fix Oops in rtas_stop_self()
Date: Mon, 28 Apr 2014 08:26:45 +0800 [thread overview]
Message-ID: <1398644805.3046.7.camel@ThinkPad-T5421> (raw)
In-Reply-To: <20140425221833.3cc04b0c@kryten>
On Fri, 2014-04-25 at 22:18 +1000, Anton Blanchard wrote:
> Hi,
>
> > When trying offline cpus, I noticed following Oops in
> > rtas_stop_self(), and it seems caused by commit 41dd03a9. The Oops
> > disappears after reverting this commit.
> >
> > After reading the code, I guess it might be caused by moving the
> > rtas_args to stack. Still need some more time to read enter_rtas to
> > understand why it happens, but the problem seems could be solved by
> > moving the rtas_args away from stack by adding static before it.
>
> Nice catch. RTAS is 32bit and if your box has more than 4GB RAM then
> your stack could easily be outside 32bit range.
Ah, yes, the stack here is obviously at a much higher address than 4GB.
>
> You can add:
>
> Signed-off-by: Anton Blanchard <anton@samba.org>
>
> And also:
>
> Cc: stable@vger.kernel.org # 3.14+
OK,
Thanks, Zhong
>
> > Signed-off-by: Li Zhong <zhong@linux.vnet.ibm.com>
> > ---
> > arch/powerpc/platforms/pseries/hotplug-cpu.c | 5 +++--
> > 1 file changed, 3 insertions(+), 2 deletions(-)
> >
> > diff --git a/arch/powerpc/platforms/pseries/hotplug-cpu.c
> > b/arch/powerpc/platforms/pseries/hotplug-cpu.c index 9b8e050..20d6297
> > 100644 --- a/arch/powerpc/platforms/pseries/hotplug-cpu.c
> > +++ b/arch/powerpc/platforms/pseries/hotplug-cpu.c
> > @@ -88,13 +88,14 @@ void set_default_offline_state(int cpu)
> >
> > static void rtas_stop_self(void)
> > {
> > - struct rtas_args args = {
> > - .token = cpu_to_be32(rtas_stop_self_token),
> > + static struct rtas_args args = {
> > .nargs = 0,
> > .nret = 1,
> > .rets = &args.args[0],
> > };
> >
> > + args.token = cpu_to_be32(rtas_stop_self_token);
> > +
> > local_irq_disable();
> >
> > BUG_ON(rtas_stop_self_token == RTAS_UNKNOWN_SERVICE);
> >
> >
> > _______________________________________________
> > Linuxppc-dev mailing list
> > Linuxppc-dev@lists.ozlabs.org
> > https://lists.ozlabs.org/listinfo/linuxppc-dev
>
next prev parent reply other threads:[~2014-04-28 0:26 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-04-25 9:33 [RFC PATCH] Fix Oops in rtas_stop_self() Li Zhong
2014-04-25 12:18 ` Anton Blanchard
2014-04-28 0:26 ` Li Zhong [this message]
2014-04-28 9:06 ` David Laight
2014-04-28 9:17 ` Benjamin Herrenschmidt
2014-04-28 0:29 ` [PATCH] powerpc: " Li Zhong
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=1398644805.3046.7.camel@ThinkPad-T5421 \
--to=zhong@linux.vnet.ibm.com \
--cc=anton@samba.org \
--cc=benh@au1.ibm.com \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=paulus@samba.org \
/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;
as well as URLs for NNTP newsgroup(s).