[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-Id: <20150426.160627.2170240613916324389.davem@davemloft.net>
Date: Sun, 26 Apr 2015 16:06:27 -0400 (EDT)
From: David Miller <davem@...emloft.net>
To: khoroshilov@...ras.ru
Cc: antoine.tenart@...e-electrons.com, arnd@...db.de,
sebastian.hesselbarth@...il.com, netdev@...r.kernel.org,
linux-kernel@...r.kernel.org, ldv-project@...uxtesting.org
Subject: Re: [PATCH] pxa168: fix double deallocation of managed resources
From: Alexey Khoroshilov <khoroshilov@...ras.ru>
Date: Sat, 25 Apr 2015 04:07:03 +0300
> Commit 43d3ddf87a57 ("net: pxa168_eth: add device tree support") starts
> to use managed resources by adding devm_clk_get() and
> devm_ioremap_resource(), but it leaves explicit iounmap() and clock_put()
> in pxa168_eth_remove() and in failure handling code of pxa168_eth_probe().
> As a result double free can happen.
>
> The patch removes explicit resource deallocation. Also it converts
> clk_disable() to clk_disable_unprepare() to make it symmetrical with
> clk_prepare_enable().
>
> Found by Linux Driver Verification project (linuxtesting.org).
>
> Signed-off-by: Alexey Khoroshilov <khoroshilov@...ras.ru>
Applied and queued up for -stable, thanks.
I find this patch _extremely_ amusing, as it shows that that these
managed interfaces can be just as error prone to use as the
non-managed ones. :-)
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists