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: <437fdf05-296e-43b8-9894-1da429dfab1a@linaro.org>
Date: Mon, 4 Aug 2025 11:12:56 +0200
From: Daniel Lezcano <daniel.lezcano@...aro.org>
To: Ghennadi Procopciuc <ghennadi.procopciuc@....nxp.com>, tglx@...utronix.de
Cc: S32@....com, linux-kernel@...r.kernel.org
Subject: Re: [PATCH v2 07/20] clocksource/drivers/vf-pit: Allocate the struct
 timer at init time

On 01/08/2025 09:33, Ghennadi Procopciuc wrote:
> On 7/30/2025 11:27 AM, Daniel Lezcano wrote:
> 
> [...]
> 

[ ... ]

>> +	ret = -EINVAL;
>>   	irq = irq_of_parse_and_map(np, 0);
>> -	if (irq <= 0)
>> -		return -EINVAL;
>> +	if (irq <= 0) {
>> +		pr_err("Failed to irq_of_parse_and_map\n");
>> +		goto out_iounmap;
>> +	}
>>   
>>   	pit_clk = of_clk_get(np, 0);
>> -	if (IS_ERR(pit_clk))
>> -		return PTR_ERR(pit_clk);
>> +	if (IS_ERR(pit_clk)) {
>> +		ret = PTR_ERR(pit_clk);
>> +		goto out_iounmap;
> 
> This does not revert the use of irq_of_parse_and_map. In my opinion, it
> should be explicitly reverted as part of the cleanup phase by calling
> irq_of_parse_and_map.

AFAICT, it does not make sense to undo irq_of_parse_and_map() and there 
is no revert function for that.

However, calling free_irq as commented in patch 20/20 makes sense.


-- 
<http://www.linaro.org/> Linaro.org │ Open source software for ARM SoCs

Follow Linaro:  <http://www.facebook.com/pages/Linaro> Facebook |
<http://twitter.com/#!/linaroorg> Twitter |
<http://www.linaro.org/linaro-blog/> Blog

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ