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: <20131209084425.GO24559@pengutronix.de>
Date:	Mon, 9 Dec 2013 09:44:25 +0100
From:	Sascha Hauer <s.hauer@...gutronix.de>
To:	Heikki Krogerus <heikki.krogerus@...ux.intel.com>
Cc:	Sergei Ianovich <ynvich@...il.com>, linux-kernel@...r.kernel.org,
	Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
	James Cameron <quozl@...top.org>,
	Russell King <linux@....linux.org.uk>,
	Jiri Slaby <jslaby@...e.cz>,
	Grant Likely <grant.likely@...aro.org>,
	Rob Herring <rob.herring@...xeda.com>,
	Zhou Zhu <zzhu3@...vell.com>,
	Andrew Morton <akpm@...ux-foundation.org>,
	Haojian Zhuang <haojian.zhuang@...il.com>,
	Stefan Seyfried <seife+kernel@...systems.com>,
	John Crispin <blogic@...nwrt.org>,
	Paul Bolle <pebolle@...cali.nl>,
	"moderated list:ARM PORT" <linux-arm-kernel@...ts.infradead.org>,
	"open list:SERIAL DRIVERS" <linux-serial@...r.kernel.org>,
	"open list:OPEN FIRMWARE AND..." <devicetree@...r.kernel.org>
Subject: Re: [PATCH v2] serial: rewrite pxa2xx-uart to use 8250_core

On Mon, Dec 09, 2013 at 10:38:15AM +0200, Heikki Krogerus wrote:
> Hi,
> 
> > +	return 0;
> > +
> > + err_clk:
> > +	clk_unprepare(data->clk);
> > + err_free_clk:
> > +	devm_clk_put(&pdev->dev, data->clk);
> > + err_free:
> > +	devm_kfree(&pdev->dev, data);
> 
> And there labels could be dropped.

This should really be fixed. Explicitly releasing devm_* allocated
resources invalidates the whole idea of the devm functions. People
looking for templates shouldn't find examples for this in the kernel.

Sascha

-- 
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ