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] [day] [month] [year] [list]
Date:	Mon, 18 Apr 2011 10:29:38 +0200
From:	Nicolas Ferre <nicolas.ferre@...el.com>
To:	"Voss, Nikolaus" <N.Voss@...nmann.de>
CC:	"'Linux Kernel'" <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] drivers/spi/atmel_spi.c: prevent premature irqs

Le 11/04/2011 08:53, Voss, Nikolaus :
> When restarting a kernel using kexec, filled rx buffers on SPI master
> interface reliably crash the kernel. This patch disables rx interrupts
> on startup to avoid this. Interrupts will be regulary enabled at start
> of a new SPI master transfer.
> 
> Signed-off-by: Nikolaus Voss <n.voss@...nmann.de>

Acked-by: Nicolas Ferre <nicolas.ferre@...el.com>

> ---
>  drivers/spi/atmel_spi.c |    3 +++
>  1 files changed, 3 insertions(+), 0 deletions(-)
> 
> diff --git a/drivers/spi/atmel_spi.c b/drivers/spi/atmel_spi.c
> index 1a478bf..d17f14c 100644
> --- a/drivers/spi/atmel_spi.c
> +++ b/drivers/spi/atmel_spi.c
> @@ -811,6 +811,9 @@ static int __init atmel_spi_probe(struct platform_device *pdev)
>  	as->irq = irq;
>  	as->clk = clk;
>  
> +	/* disable rx interrupts to avoid premature irq triggering */
> +	spi_writel(as, IDR, SPI_BIT(RXBUFF) | SPI_BIT(ENDRX) | SPI_BIT(OVRES));
> +
>  	ret = request_irq(irq, atmel_spi_interrupt, 0,
>  			dev_name(&pdev->dev), master);
>  	if (ret)


-- 
Nicolas Ferre

--
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