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: <6fd4-64ecbe00-3-213b7840@157890307>
Date:   Mon, 28 Aug 2023 16:32:35 +0100
From:   "Helen Mae Koike Fornazier" <helen.koike@...labora.com>
To:     "Zhang Shurong" <zhang_shurong@...mail.com>
Cc:     ldewangan@...dia.com, linux-spi@...r.kernel.org,
        linux-kernel@...r.kernel.org, dri-devel@...ts.freedesktop.org,
        sumit.semwal@...aro.org, linaro-mm-sig@...ts.linaro.org,
        broonie@...nel.org, thierry.reding@...il.com,
        linux-tegra@...r.kernel.org, jonathanh@...dia.com,
        christian.koenig@....com, linux-media@...r.kernel.org
Subject: Re: [PATCH] spi: tegra: Fix 
 missing IRQ check in tegra_slink_probe()

On Saturday, August 26, 2023 07:02 -03, Zhang Shurong <zhang_shurong@...mail.com> wrote:

> This func misses checking for platform_get_irq()'s call and may passes the
> negative error codes to request_irq(), which takes unsigned IRQ #,
> causing it to fail with -EINVAL, overriding an original error code.
> 
> Fix this by stop calling request_irq() with invalid IRQ #s.
> 
> Fixes: dc4dc3605639 ("spi: tegra: add spi driver for SLINK controller")
> Signed-off-by: Zhang Shurong <zhang_shurong@...mail.com>

Reviewed-by: Helen Koike <helen.koike@...labora.com>

> ---
>  drivers/spi/spi-tegra20-slink.c | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/drivers/spi/spi-tegra20-slink.c b/drivers/spi/spi-tegra20-slink.c
> index 4d6db6182c5e..f5cd365c913a 100644
> --- a/drivers/spi/spi-tegra20-slink.c
> +++ b/drivers/spi/spi-tegra20-slink.c
> @@ -1086,6 +1086,8 @@ static int tegra_slink_probe(struct platform_device *pdev)
>  	reset_control_deassert(tspi->rst);
>  
>  	spi_irq = platform_get_irq(pdev, 0);
> +	if (spi_irq < 0)
> +		return spi_irq;
>  	tspi->irq = spi_irq;
>  	ret = request_threaded_irq(tspi->irq, tegra_slink_isr,
>  				   tegra_slink_isr_thread, IRQF_ONESHOT,
> -- 
> 2.30.2
>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ