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: <d09484f7cda13de3f156bd1bcba8c2671495dcd1.camel@intel.com>
Date:   Tue, 12 Apr 2022 21:12:36 +0000
From:   "Winiarska, Iwona" <iwona.winiarska@...el.com>
To:     "andrew@...id.au" <andrew@...id.au>,
        "cgel.zte@...il.com" <cgel.zte@...il.com>,
        "joel@....id.au" <joel@....id.au>
CC:     "lv.ruyi@....com.cn" <lv.ruyi@....com.cn>,
        "jae.hyun.yoo@...ux.intel.com" <jae.hyun.yoo@...ux.intel.com>,
        "zealci@....com.cn" <zealci@....com.cn>,
        "linux-aspeed@...ts.ozlabs.org" <linux-aspeed@...ts.ozlabs.org>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        "linux-arm-kernel@...ts.infradead.org" 
        <linux-arm-kernel@...ts.infradead.org>,
        "pierre-louis.bossart@...ux.intel.com" 
        <pierre-louis.bossart@...ux.intel.com>,
        "openbmc@...ts.ozlabs.org" <openbmc@...ts.ozlabs.org>
Subject: Re: [PATCH] peci: fix error check return value of platform_get_irq()

On Tue, 2022-04-12 at 09:01 +0000, cgel.zte@...il.com wrote:
> From: Lv Ruyi <lv.ruyi@....com.cn>

Thanks for the fix. Can we prefix the subject with "peci: aspeed:"? Just to
distinguish changes related to specific controller from the ones touching peci-
core.

> 
> platform_get_irq() return negative value on failure, so null check of
> priv->irq is incorrect. Fix it by comparing whether it is less than zero.
> 
> Fixes: a85e4c52086c ("peci: Add peci-aspeed controller driver")
> Reported-by: Zeal Robot <zealci@....com.cn>
> Signed-off-by: Lv Ruyi <lv.ruyi@....com.cn>

Reviewed-by: Iwona Winiarska <iwona.winiarska@...el.com>

-Iwona

> ---
>  drivers/peci/controller/peci-aspeed.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/peci/controller/peci-aspeed.c
> b/drivers/peci/controller/peci-aspeed.c
> index 1925ddc13f00..731c5d8f75c6 100644
> --- a/drivers/peci/controller/peci-aspeed.c
> +++ b/drivers/peci/controller/peci-aspeed.c
> @@ -523,7 +523,7 @@ static int aspeed_peci_probe(struct platform_device *pdev)
>                 return PTR_ERR(priv->base);
>  
>         priv->irq = platform_get_irq(pdev, 0);
> -       if (!priv->irq)
> +       if (priv->irq < 0)
>                 return priv->irq;
>  
>         ret = devm_request_irq(&pdev->dev, priv->irq, aspeed_peci_irq_handler,

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ