[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20190204103627.929620553@linuxfoundation.org>
Date: Mon, 4 Feb 2019 11:37:15 +0100
From: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
To: linux-kernel@...r.kernel.org
Cc: Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
stable@...r.kernel.org, Lukas Wunner <lukas@...ner.de>,
Frank Pavlic <f.pavlic@...bus.de>,
Stefan Wahren <stefan.wahren@...e.com>,
Ulf Hansson <ulf.hansson@...aro.org>
Subject: [PATCH 4.20 55/80] mmc: bcm2835: Fix DMA channel leak on probe error
4.20-stable review patch. If anyone has any objections, please let me know.
------------------
From: Lukas Wunner <lukas@...ner.de>
commit 8c9620b1cc9b69e82fa8d4081d646d0016b602e7 upstream.
The BCM2835 MMC host driver requests a DMA channel on probe but neglects
to release the channel in the probe error path. The channel may
therefore be leaked, in particular if devm_clk_get() causes probe
deferral. Fix it.
Fixes: 660fc733bd74 ("mmc: bcm2835: Add new driver for the sdhost controller.")
Signed-off-by: Lukas Wunner <lukas@...ner.de>
Cc: stable@...r.kernel.org # v4.12+
Cc: Frank Pavlic <f.pavlic@...bus.de>
Tested-by: Stefan Wahren <stefan.wahren@...e.com>
Signed-off-by: Ulf Hansson <ulf.hansson@...aro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
---
drivers/mmc/host/bcm2835.c | 2 ++
1 file changed, 2 insertions(+)
--- a/drivers/mmc/host/bcm2835.c
+++ b/drivers/mmc/host/bcm2835.c
@@ -1427,6 +1427,8 @@ static int bcm2835_probe(struct platform
err:
dev_dbg(dev, "%s -> err %d\n", __func__, ret);
+ if (host->dma_chan_rxtx)
+ dma_release_channel(host->dma_chan_rxtx);
mmc_free_host(mmc);
return ret;
Powered by blists - more mailing lists