lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <54B816AC.7070902@gmail.com>
Date:	Thu, 15 Jan 2015 11:36:12 -0800
From:	David Daney <ddaney.cavm@...il.com>
To:	Aaro Koskinen <aaro.koskinen@....fi>
CC:	Ralf Baechle <ralf@...ux-mips.org>,
	David Daney <david.daney@...ium.com>,
	linux-mips@...ux-mips.org, linux-kernel@...r.kernel.org,
	Hemmo Nieminen <hemmo.nieminen@....fi>, stable@...r.kernel.org
Subject: Re: [PATCH 1/2] MIPS: OCTEON: fix kernel crash when offlining a CPU

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@....fi>
> Signed-off-by: Aaro Koskinen <aaro.koskinen@....fi>
> Cc: stable@...r.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.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ