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
| ||
|
Date: Wed, 14 Oct 2015 09:52:58 +0100 From: Daniel Thompson <daniel.thompson@...aro.org> To: M'boumba Cedric Madianga <cedric.madianga@...il.com> Cc: Maxime Coquelin <mcoquelin.stm32@...il.com>, robh+dt@...nel.org, pawel.moll@....com, Mark Rutland <mark.rutland@....com>, ijc+devicetree@...lion.org.uk, Kumar Gala <galak@...eaurora.org>, linux@....linux.org.uk, vinod.koul@...el.com, linux-arm-kernel@...ts.infradead.org, devicetree@...r.kernel.org, linux-kernel@...r.kernel.org, dmaengine@...r.kernel.org Subject: Re: [PATCH v2 2/4] dmaengine: Add STM32 DMA driver On 14/10/15 08:54, M'boumba Cedric Madianga wrote: >>> +static int stm32_dma_alloc_chan_resources(struct dma_chan *c) >>> +{ >>> + struct stm32_dma_chan *chan = to_stm32_dma_chan(c); >>> + struct stm32_dma_device *dmadev = stm32_dma_chan_get_dev(chan); >>> + int ret; >>> + >>> + chan->config_init = false; >>> + ret = clk_prepare_enable(dmadev->clk); >>> + if (ret < 0) { >>> + dev_err(chan2dev(chan), "clk_prepare_enable failed: %d\n", >>> ret); >>> + return ret; >>> + } >>> + >>> + ret = stm32_dma_disable_chan(chan); >>> + >>> + return ret; >>> +} >> >> >> The error path here looks like it will leak clock references. > > Sorry I didn't catch it. What does it mean ? If stm32_dma_disable_chan() returns an error then we will not restore the original the clock counts causing them to "leak". Daniel. -- 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