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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <ZuwBWofLJ3ZbKpi8@finisterre.sirena.org.uk>
Date: Thu, 19 Sep 2024 12:47:54 +0200
From: Mark Brown <broonie@...nel.org>
To: Jinjie Ruan <ruanjinjie@...wei.com>
Cc: xiaoning.wang@....com, linux-spi@...r.kernel.org,
	linux-kernel@...r.kernel.org
Subject: Re: [PATCH] spi: spi-fsl-lpspi: Use IRQF_NO_AUTOEN flag in
 request_irq()

On Fri, Sep 06, 2024 at 10:28:28AM +0800, Jinjie Ruan wrote:
> disable_irq() after request_irq() still has a time gap in which
> interrupts can come. request_irq() with IRQF_NO_AUTOEN flag will
> disable IRQ auto-enable when request IRQ.

> @@ -948,14 +948,10 @@ static int fsl_lpspi_probe(struct platform_device *pdev)
>  	ret = fsl_lpspi_dma_init(&pdev->dev, fsl_lpspi, controller);
>  	if (ret == -EPROBE_DEFER)
>  		goto out_pm_get;
> -	if (ret < 0)
> +	if (ret < 0) {
>  		dev_warn(&pdev->dev, "dma setup error %d, use pio\n", ret);
> -	else
> -		/*
> -		 * disable LPSPI module IRQ when enable DMA mode successfully,
> -		 * to prevent the unexpected LPSPI module IRQ events.
> -		 */
> -		disable_irq(irq);
> +		enable_irq(irq);
> +	}

This now enabled the interrupt in the case where we previously would've
disabled it - I would have expected the condition on the if statement to
be reversed?

Download attachment "signature.asc" of type "application/pgp-signature" (489 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ