public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: David Daney <ddaney.cavm@gmail.com>
To: Aaro Koskinen <aaro.koskinen@iki.fi>
Cc: Ralf Baechle <ralf@linux-mips.org>,
	David Daney <david.daney@cavium.com>,
	linux-mips@linux-mips.org, linux-kernel@vger.kernel.org,
	Hemmo Nieminen <hemmo.nieminen@iki.fi>,
	stable@vger.kernel.org
Subject: Re: [PATCH 1/2] MIPS: OCTEON: fix kernel crash when offlining a CPU
Date: Thu, 15 Jan 2015 11:36:12 -0800	[thread overview]
Message-ID: <54B816AC.7070902@gmail.com> (raw)
In-Reply-To: <1421347767-21740-1-git-send-email-aaro.koskinen@iki.fi>

On 01/15/2015 10:49 AM, Aaro Koskinen wrote:
> octeon_cpu_disable() will unconditionally enable interrupts when called
> with interrupts disabled. Fix that.

interrupts are always disabled here, so...

[...]
>
> Reported-by: Hemmo Nieminen <hemmo.nieminen@iki.fi>
> Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
> Cc: stable@vger.kernel.org

NACK!

> ---
>   arch/mips/cavium-octeon/smp.c | 5 +++--
>   1 file changed, 3 insertions(+), 2 deletions(-)
>
> diff --git a/arch/mips/cavium-octeon/smp.c b/arch/mips/cavium-octeon/smp.c
> index ecd903d..9673c5b 100644
> --- a/arch/mips/cavium-octeon/smp.c
> +++ b/arch/mips/cavium-octeon/smp.c
> @@ -231,6 +231,7 @@ DEFINE_PER_CPU(int, cpu_state);
>   static int octeon_cpu_disable(void)
>   {
>   	unsigned int cpu = smp_processor_id();
> +	unsigned long flags;
>
>   	if (cpu == 0)
>   		return -EBUSY;
> @@ -240,9 +241,9 @@ static int octeon_cpu_disable(void)
>
>   	set_cpu_online(cpu, false);
>   	cpu_clear(cpu, cpu_callin_map);
> -	local_irq_disable();
> +	local_irq_save(flags);

Just remove this...

>   	octeon_fixup_irqs();
> -	local_irq_enable();
> +	local_irq_restore(flags);

... and this.

>
>   	flush_cache_all();
>   	local_flush_tlb_all();
>

You can add an Acked-by me if you do that.

David Daney.

  parent reply	other threads:[~2015-01-15 19:36 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-01-15 18:49 [PATCH 1/2] MIPS: OCTEON: fix kernel crash when offlining a CPU Aaro Koskinen
2015-01-15 18:49 ` [PATCH 2/2] MIPS: fix kernel lockup or crash after CPU offline/online Aaro Koskinen
2015-01-15 19:36 ` David Daney [this message]
2015-01-15 19:53   ` [PATCH 1/2] MIPS: OCTEON: fix kernel crash when offlining a CPU Aaro Koskinen
2015-01-15 20:10     ` David Daney
2015-01-15 20:24       ` Aaro Koskinen

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=54B816AC.7070902@gmail.com \
    --to=ddaney.cavm@gmail.com \
    --cc=aaro.koskinen@iki.fi \
    --cc=david.daney@cavium.com \
    --cc=hemmo.nieminen@iki.fi \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mips@linux-mips.org \
    --cc=ralf@linux-mips.org \
    --cc=stable@vger.kernel.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