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: <1d9f02d3-45ac-1d2f-457b-91cae123383d@web.de>
Date:   Tue, 22 Oct 2019 11:12:39 +0200
From:   Markus Elfring <Markus.Elfring@....de>
To:     Navid Emamdoost <navid.emamdoost@...il.com>,
        Daniel Lezcano <daniel.lezcano@...aro.org>,
        Bartosz Golaszewski <bgolaszewski@...libre.com>,
        kernel-janitors@...r.kernel.org
Cc:     linux-kernel@...r.kernel.org, Navid Emamdoost <emamd001@....edu>,
        Kangjie Lu <kjlu@....edu>, Stephen McCamant <smccaman@....edu>,
        Thomas Gleixner <tglx@...utronix.de>
Subject: Re: [PATCH] clocksource/drivers/davinci: Fix memory leak in
 davinci_timer_register

> In the impelementation of davinci_timer_register() the allocated memory
> for clockevent should be released if request_irq() fails.

* Please avoid the copying of typos from previous change descriptions.

* Under which circumstances will an “imperative mood” matter for you here?
  https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/Documentation/process/submitting-patches.rst?id=7d194c2100ad2a6dded545887d02754948ca5241#n151


> +++ b/drivers/clocksource/timer-davinci.c
> @@ -299,6 +299,7 @@ int __init davinci_timer_register(struct clk *clk,
>  			 "clockevent/tim12", clockevent);
>  	if (rv) {
>  		pr_err("Unable to request the clockevent interrupt");
> +		kfree(clockevent);
>  		return rv;
>  	}

* Should a complete source code analysis point out that a similar fix
  will be needed also in the if branch after a failed call of
  the function “clocksource_register_hz”?

* Can any more exception handling become relevant because of previous
  resource allocations in this function implementation?

Regards,
Markus

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ