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] [day] [month] [year] [list]
Date:   Wed, 10 Aug 2022 12:14:26 +0100
From:   Lee Jones <lee@...nel.org>
To:     Christophe JAILLET <christophe.jaillet@...adoo.fr>
Cc:     Shawn Guo <shawnguo@...nel.org>,
        Sascha Hauer <s.hauer@...gutronix.de>,
        Pengutronix Kernel Team <kernel@...gutronix.de>,
        Fabio Estevam <festevam@...il.com>,
        NXP Linux Team <linux-imx@....com>,
        Benjamin Gaignard <benjamin.gaignard@...aro.org>,
        linux-kernel@...r.kernel.org, kernel-janitors@...r.kernel.org,
        Lee Jones <lee.jones@...aro.org>,
        linux-arm-kernel@...ts.infradead.org
Subject: Re: [PATCH] mfd: fsl-imx25: Fix an error handling path in
 mx25_tsadc_setup_irq()

On Sun, 31 Jul 2022, Christophe JAILLET wrote:

> If devm_of_platform_populate() fails, some resources need to be
> released.
> 
> Introduce a mx25_tsadc_unset_irq() function that undoes
> mx25_tsadc_setup_irq() and call it both from the new error handling path
> of the probe and in the remove function.
> 
> Fixes: a55196eff6d6 ("mfd: fsl-imx25: Use devm_of_platform_populate()")
> Signed-off-by: Christophe JAILLET <christophe.jaillet@...adoo.fr>
> ---
> mx25_tsadc_setup_irq() and mx25_tsadc_unset_irq() are not symetrical.
> One tests for "(irq <= 0)" while the other one tests for "(irq)".
> 
> If <0 the probe will fails, so that is fine.
> If ==0, according to doc platform_get_irq() can't return 0, so that should
> be fine as well.
> 
> 
> That said, I think that the "if (irq)" in mx25_tsadc_unset_irq() can be
> removed.
> ---
>  drivers/mfd/fsl-imx25-tsadc.c | 32 ++++++++++++++++++++++++--------
>  1 file changed, 24 insertions(+), 8 deletions(-)

Applied, thanks.

-- 
Lee Jones [李琼斯]

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ