summaryrefslogtreecommitdiff
path: root/drivers/irqchip
diff options
context:
space:
mode:
authorRichard Genoud <richard.genoud@gmail.com>2018-11-27 17:06:34 +0100
committerVinod Koul <vkoul@kernel.org>2018-11-29 19:49:41 +0530
commit98f5f932254b88ce828bc8e4d1642d14e5854caa (patch)
treea2eea3540da857c8403d299f263d732ed89543b3 /drivers/irqchip
parent651022382c7f8da46cb4872a545ee1da6d097d2a (diff)
dmaengine: at_hdmac: fix memory leak in at_dma_xlate()
The leak was found when opening/closing a serial port a great number of time, increasing kmalloc-32 in slabinfo. Each time the port was opened, dma_request_slave_channel() was called. Then, in at_dma_xlate(), atslave was allocated with devm_kzalloc() and never freed. (Well, it was free at module unload, but that's not what we want). So, here, kzalloc is more suited for the job since it has to be freed in atc_free_chan_resources(). Cc: stable@vger.kernel.org Fixes: bbe89c8e3d59 ("at_hdmac: move to generic DMA binding") Reported-by: Mario Forner <m.forner@be4energy.com> Suggested-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Acked-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Acked-by: Ludovic Desroches <ludovic.desroches@microchip.com> Signed-off-by: Richard Genoud <richard.genoud@gmail.com> Signed-off-by: Vinod Koul <vkoul@kernel.org>
Diffstat (limited to 'drivers/irqchip')
0 files changed, 0 insertions, 0 deletions