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-next>] [day] [month] [year] [list]
Message-ID: <65e734f7-c43c-f96b-3650-980e15edba60@web.de>
Date:   Tue, 23 Jun 2020 17:55:33 +0200
From:   Markus Elfring <Markus.Elfring@....de>
To:     Tiezhu Yang <yangtiezhu@...ngson.cn>, devicetree@...r.kernel.org,
        linux-mips@...r.kernel.org
Cc:     kernel-janitors@...r.kernel.org, linux-kernel@...r.kernel.org,
        Huacai Chen <chenhc@...ote.com>,
        Jason Cooper <jason@...edaemon.net>,
        Jiaxun Yang <jiaxun.yang@...goat.com>,
        Marc Zyngier <maz@...nel.org>,
        Rob Herring <robh+dt@...nel.org>,
        Thomas Gleixner <tglx@...utronix.de>,
        Xuefeng Li <lixuefeng@...ngson.cn>
Subject: Re: [PATCH 1/7] irqchip: Fix potential resource leaks

> There exists some potential resource leaks in the error path, fix them.

Will the tag “Fixes” become relevant for the commit message?


…
> +++ b/drivers/irqchip/irq-nvic.c
> @@ -94,6 +94,7 @@ static int __init nvic_of_init(struct device_node *node,
>
>  	if (!nvic_irq_domain) {
>  		pr_warn("Failed to allocate irq domain\n");
> +		iounmap(nvic_base);
>  		return -ENOMEM;
>  	}
>
> @@ -103,6 +104,7 @@ static int __init nvic_of_init(struct device_node *node,
>  	if (ret) {
>  		pr_warn("Failed to allocate irq chips\n");
>  		irq_domain_remove(nvic_irq_domain);
> +		iounmap(nvic_base);
>  		return ret;
>  	}

Can it helpful to add jump targets so that a bit of exception handling
can be better reused at the end of this function?

Regards,
Markus

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ