Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1225108
| From | Ludovic Desroches <ludovic.desroches@atmel.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | [PATCH 3/4] dmaengine: at_xdmac: fix memory leak in interleaved mode |
| Date | 2015-09-15 15:40 +0200 |
| Message-ID | <q8YCK-6fP-37@gated-at.bofh.it> (permalink) |
| References | <q8Yt4-64o-7@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
In interleaved mode, when numf > 1, we have only one descriptor for the
transfer but this descriptor has to be added to the descs_list. If not,
when doing remove_xfer, the descriptor won't be put back in the
free_descs_list.
Signed-off-by: Ludovic Desroches <ludovic.desroches@atmel.com>
---
drivers/dma/at_xdmac.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/drivers/dma/at_xdmac.c b/drivers/dma/at_xdmac.c
index 3952bff..fbd4093 100644
--- a/drivers/dma/at_xdmac.c
+++ b/drivers/dma/at_xdmac.c
@@ -958,6 +958,10 @@ at_xdmac_prep_interleaved(struct dma_chan *chan,
xt, xt->sgl);
for (i = 0; i < xt->numf; i++)
at_xdmac_increment_block_count(chan, first);
+
+ dev_dbg(chan2dev(chan), "%s: add desc 0x%p to descs_list 0x%p\n",
+ __func__, first, first);
+ list_add_tail(&first->desc_node, &first->descs_list);
} else {
for (i = 0; i < xt->frame_size; i++) {
size_t src_icg = 0, dst_icg = 0;
--
2.5.0
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Back to linux.kernel | Previous | Next — Previous in thread | Find similar | Unroll thread
[PATCH 0/4] at_xdmac: improvment and fixes for the interleaved mode Ludovic Desroches <ludovic.desroches@atmel.com> - 2015-09-15 15:30 +0200 [PATCH 1/4] dmaengine: at_xdmac: handle numf > 1 Ludovic Desroches <ludovic.desroches@atmel.com> - 2015-09-15 15:30 +0200 [PATCH 4/4] dmaengine: at_xdmac: clean used descriptor Ludovic Desroches <ludovic.desroches@atmel.com> - 2015-09-15 15:40 +0200 [PATCH 2/4] dmaengine: at_xdmac: change block increment addressing mode Ludovic Desroches <ludovic.desroches@atmel.com> - 2015-09-15 15:40 +0200 [PATCH 3/4] dmaengine: at_xdmac: fix memory leak in interleaved mode Ludovic Desroches <ludovic.desroches@atmel.com> - 2015-09-15 15:40 +0200
csiph-web