[PATCH RESEND v2] dma: cppi41: only allocate descriptor memory once

2013-12-04 Thread Daniel Mack
cdd-cd and cdd-descs_phys are allocated DESCS_AREAS times from init_descs() and freed as often from purge_descs(). This leads to both memory leaks and double-frees. Fix this by pulling the calls to dma_{alloc,free}_coherent() out of the loops. While at it, remove the intermediate variable

Re: [PATCH RESEND v2] dma: cppi41: only allocate descriptor memory once

2013-12-04 Thread Sebastian Andrzej Siewior
* Daniel Mack | 2013-12-04 18:22:24 [+0100]: cdd-cd and cdd-descs_phys are allocated DESCS_AREAS times from init_descs() and freed as often from purge_descs(). This leads to both memory leaks and double-frees. Fix this by pulling the calls to dma_{alloc,free}_coherent() out of the loops. While

Re: [PATCH RESEND v2] dma: cppi41: only allocate descriptor memory once

2013-12-04 Thread Daniel Mack
On 12/04/2013 07:58 PM, Sebastian Andrzej Siewior wrote: * Daniel Mack | 2013-12-04 18:22:24 [+0100]: cdd-cd and cdd-descs_phys are allocated DESCS_AREAS times from init_descs() and freed as often from purge_descs(). This leads to both memory leaks and double-frees. Fix this by pulling the

Re: [PATCH RESEND v2] dma: cppi41: only allocate descriptor memory once

2013-12-04 Thread Daniel Mack
On 12/04/2013 07:58 PM, Sebastian Andrzej Siewior wrote: * Daniel Mack | 2013-12-04 18:22:24 [+0100]: cdd-cd and cdd-descs_phys are allocated DESCS_AREAS times from init_descs() and freed as often from purge_descs(). This leads to both memory leaks and double-frees. Fix this by pulling the