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:   Wed, 28 Sep 2022 00:35:25 +1000
From:   Michael Ellerman <mpe@...erman.id.au>
To:     cgel.zte@...il.com, benh@...nel.crashing.org
Cc:     paulus@...ba.org, maz@...nel.org, jgg@...pe.ca, tglx@...utronix.de,
        lv.ruyi@....com.cn, linuxppc-dev@...ts.ozlabs.org,
        linux-kernel@...r.kernel.org, Zeal Robot <zealci@....com.cn>
Subject: Re: [PATCH] powerpc/fsl_msi: fix return error value in error
 handing path

cgel.zte@...il.com writes:
> From: Lv Ruyi <lv.ruyi@....com.cn>
>
> This function fsl_msi_setup_hwirq() seems to return zero on success and
> non-zero on failure, but it returns zero in error handing path.

I agree it seems wrong, but I can't be sure the current code is wrong,
so unless you're able to test this on actual hardware (or qemu), I'll
drop this patch.

cheers

> Reported-by: Zeal Robot <zealci@....com.cn>
> Signed-off-by: Lv Ruyi <lv.ruyi@....com.cn>
> ---
>  arch/powerpc/sysdev/fsl_msi.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/arch/powerpc/sysdev/fsl_msi.c b/arch/powerpc/sysdev/fsl_msi.c
> index b3475ae9f236..10f974cfa2f3 100644
> --- a/arch/powerpc/sysdev/fsl_msi.c
> +++ b/arch/powerpc/sysdev/fsl_msi.c
> @@ -353,7 +353,7 @@ static int fsl_msi_setup_hwirq(struct fsl_msi *msi, struct platform_device *dev,
>  	if (!virt_msir) {
>  		dev_err(&dev->dev, "%s: Cannot translate IRQ index %d\n",
>  			__func__, irq_index);
> -		return 0;
> +		return -EINVAL;
>  	}
>  
>  	cascade_data = kzalloc(sizeof(struct fsl_msi_cascade_data), GFP_KERNEL);
> -- 
> 2.25.1

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ