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: <20160411085323.GM4592@x1>
Date:	Mon, 11 Apr 2016 09:53:23 +0100
From:	Lee Jones <lee.jones@...aro.org>
To:	Henry Chen <henryc.chen@...iatek.com>, tglx@...utronix.de
Cc:	Matthias Brugger <matthias.bgg@...il.com>,
	John Crispin <blogic@...nwrt.org>,
	Sascha Hauer <s.hauer@...gutronix.de>,
	Flora Fu <flora.fu@...iatek.com>, linux-kernel@...r.kernel.org,
	linux-arm-kernel@...ts.infradead.org,
	linux-mediatek@...ts.infradead.org
Subject: Re: [PATCH v2 2/3] mfd: mt6397: Checking for null before
 irq_domain_remove.

FAO Thomas,

On Fri, 08 Apr 2016, Henry Chen wrote:
> It is possible that pmic->irq_domain will be NULL in fail_irq error handling.
> Check before calling irq_domain_remove.
> 
> Signed-off-by: Henry Chen <henryc.chen@...iatek.com>
> ---
>  drivers/mfd/mt6397-core.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/mfd/mt6397-core.c b/drivers/mfd/mt6397-core.c
> index a879223..15050cb 100644
> --- a/drivers/mfd/mt6397-core.c
> +++ b/drivers/mfd/mt6397-core.c
> @@ -312,7 +312,8 @@ static int mt6397_probe(struct platform_device *pdev)
>  
>  fail_irq:
>  	if (ret) {
> -		irq_domain_remove(pmic->irq_domain);
> +		if (pmic->irq_domain)
> +			irq_domain_remove(pmic->irq_domain);

You might be better off making this change in the framework.

Just get irq_domain_remove() to harmlessly return if !irq_domain.

>  		dev_err(&pdev->dev, "failed to add child devices: %d\n", ret);
>  	}
>  

-- 
Lee Jones
Linaro STMicroelectronics Landing Team Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ