From: Abdul Haleem <abdhalee@linux.vnet.ibm.com>
To: Nicholas Piggin <npiggin@gmail.com>
Cc: linuxppc-dev@lists.ozlabs.org, akpm@linux-foundation.org,
Stephen Rothwell <sfr@canb.auug.org.au>
Subject: Re: [PATCH] powerpc/64: Initialise thread_info for emergency stacks
Date: Wed, 21 Jun 2017 14:55:29 +0530 [thread overview]
Message-ID: <1498037129.30044.5.camel@abdul.in.ibm.com> (raw)
In-Reply-To: <20170620135801.13272-1-npiggin@gmail.com>
On Tue, 2017-06-20 at 23:58 +1000, Nicholas Piggin wrote:
> Emergency stacks have their thread_info mostly uninitialised, which in
> particular means garbage preempt_count values.
>
> Emergency stack code runs with interrupts disabled entirely, and is
> used very rarely, so this has been unnoticed so far. It was found by a
> proposed new powerpc watchdog that takes a soft-NMI directly from the
> masked_interrupt handler and using the emergency stack. That crashed at
> BUG_ON(in_nmi()) in nmi_enter(). preempt_count()s were found to be
> garbage.
>
> Reported-by: Abdul Haleem <abdhalee@linux.vnet.ibm.com>
> Signed-off-by: Nicholas Piggin <npiggin@gmail.com>
> ---
>
> FYI, this bug looks to be breaking linux-next on some powerpc
> boxes due to interaction with a proposed new powerpc watchdog
> driver Andrew has in his tree:
>
> http://marc.info/?l=linuxppc-embedded&m=149794320519941&w=2
>
> arch/powerpc/include/asm/thread_info.h | 19 +++++++++++++++++++
> arch/powerpc/kernel/setup_64.c | 6 +++---
> 2 files changed, 22 insertions(+), 3 deletions(-)
Hi Nicholas,
Thanks for the patch, Verified on next-20170621 and PowerPC bare-metal
boots fine with your patch
Tested-by: Abdul Haleem <abdhalee@linux.vnet.ibm.com>
Thanks for all your support.
--
Regard's
Abdul Haleem
IBM Linux Technology Centre
prev parent reply other threads:[~2017-06-21 9:25 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-06-20 13:58 [PATCH] powerpc/64: Initialise thread_info for emergency stacks Nicholas Piggin
2017-06-21 2:01 ` Michael Ellerman
2017-06-21 2:41 ` Nicholas Piggin
2017-06-21 9:25 ` Abdul Haleem [this message]
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=1498037129.30044.5.camel@abdul.in.ibm.com \
--to=abdhalee@linux.vnet.ibm.com \
--cc=akpm@linux-foundation.org \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=npiggin@gmail.com \
--cc=sfr@canb.auug.org.au \
/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).