[PATCH 0/4] dmaeninge/ste_dma40: bug fixes for 3.1

August 29th, 2011 - 07:40 am ET by Per Forlin | Report spam
Started off fixing a memory leak due to not freed dma descriptors
in mmci. The descriptor allocated at device_prep...(), not submitted,
isn't freed at dmaeninge_terminate_all() or dmaengine_release().
While sorting this one out some other issues were found as well.
* kernel doc missing
* duplication of d40_pool_lli_free()
* free of client descriptor triggers an oops.

Per Forlin (4):
dmaengine/ste_dma40: add missing kernel doc for pending_queue
dmaengine/ste_dma40: remove duplicate call to d40_pool_lli_free().
dmaengine/ste_dma40: fix Oops due to double free of client descriptor
dmaengine/ste_dma40: fix memory leak due to prepared descriptors

drivers/dma/ste_dma40.c | 42 +++++++++++++++++++++++++++++-
1 files changed, 29 insertions(+), 13 deletions(-)

1.7.4.1

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/
email Follow the discussionReplies 4 repliesReplies Make a reply

Replies

#1 Per Forlin
August 29th, 2011 - 07:40 am ET | Report spam
d40_desc_free() already calls d40_pool_lli_free().

Signed-off-by: Per Forlin

drivers/dma/ste_dma40.c | 3
1 files changed, 0 insertions(+), 3 deletions(-)

diff --git a/drivers/dma/ste_dma40.c b/drivers/dma/ste_dma40.c
index 486b6c0..37388d1 100644
a/drivers/dma/ste_dma40.c
+++ b/drivers/dma/ste_dma40.c
@@ -478,7 +478,6 @@ static struct d40_desc *d40_desc_get(struct d40_chan *d40c)

list_for_each_entry_safe(d, _d, &d40c->client, node)
if (async_tx_test_ack(&d->txd)) {
- d40_pool_lli_free(d40c, d);
d40_desc_remove(d);
desc = d;
memset(desc, 0, sizeof(*desc));
@@ -1209,7 +1208,6 @@ static void dma_tasklet(unsigned long data)

if (!d40d->cyclic) {
if (async_tx_test_ack(&d40d->txd)) {
- d40_pool_lli_free(d40c, d40d);
d40_desc_remove(d40d);
d40_desc_free(d40c, d40d);
} else {
@@ -1606,7 +1604,6 @@ static int d40_free_dma(struct d40_chan *d40c)
/* Release client owned descriptors */
if (!list_empty(&d40c->client))
list_for_each_entry_safe(d, _d, &d40c->client, node) {
- d40_pool_lli_free(d40c, d);
d40_desc_remove(d);
d40_desc_free(d40c, d);
}
1.7.4.1

To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

Similar topics