Linux PCI Non-Transparent Bridge framework and drivers
 help / color / mirror / Atom feed
* [PATCH] ntb: ntb_perf missing dmaengine_unmap_put
@ 2017-01-30 21:21 Dave Jiang
  2017-02-01 18:09 ` Jon Mason
  0 siblings, 1 reply; 2+ messages in thread
From: Dave Jiang @ 2017-01-30 21:21 UTC (permalink / raw)
  To: jdmason; +Cc: linux-ntb, allen.hubbe

In the normal I/O execution path, ntb_perf is missing a call to
dmaengine_unmap_put() after submission. That causes us to leak
unmap objects.

Signed-off-by: Dave Jiang <dave.jiang@intel.com>
---
 drivers/ntb/test/ntb_perf.c |    2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/ntb/test/ntb_perf.c b/drivers/ntb/test/ntb_perf.c
index e75d4fd..434e1d4 100644
--- a/drivers/ntb/test/ntb_perf.c
+++ b/drivers/ntb/test/ntb_perf.c
@@ -265,6 +265,8 @@ static ssize_t perf_copy(struct pthr_ctx *pctx, char __iomem *dst,
 	if (dma_submit_error(cookie))
 		goto err_set_unmap;
 
+	dmaengine_unmap_put(unmap);
+
 	atomic_inc(&pctx->dma_sync);
 	dma_async_issue_pending(chan);
 


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] ntb: ntb_perf missing dmaengine_unmap_put
  2017-01-30 21:21 [PATCH] ntb: ntb_perf missing dmaengine_unmap_put Dave Jiang
@ 2017-02-01 18:09 ` Jon Mason
  0 siblings, 0 replies; 2+ messages in thread
From: Jon Mason @ 2017-02-01 18:09 UTC (permalink / raw)
  To: Dave Jiang; +Cc: linux-ntb, allen.hubbe

On Mon, Jan 30, 2017 at 02:21:17PM -0700, Dave Jiang wrote:
> In the normal I/O execution path, ntb_perf is missing a call to
> dmaengine_unmap_put() after submission. That causes us to leak
> unmap objects.
> 
> Signed-off-by: Dave Jiang <dave.jiang@intel.com>

Looks good to me.  Pulled into my ntb branch.

Given that this is a bug fix, we should probably start following the
new-ish standard of adding a "Fixes: " to this.  I'll add this one by
hand.  I believe it should be:

Fixes: 8a7b6a77 ("ntb: ntb perf tool")

Thanks,
Jon

> ---
>  drivers/ntb/test/ntb_perf.c |    2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/drivers/ntb/test/ntb_perf.c b/drivers/ntb/test/ntb_perf.c
> index e75d4fd..434e1d4 100644
> --- a/drivers/ntb/test/ntb_perf.c
> +++ b/drivers/ntb/test/ntb_perf.c
> @@ -265,6 +265,8 @@ static ssize_t perf_copy(struct pthr_ctx *pctx, char __iomem *dst,
>  	if (dma_submit_error(cookie))
>  		goto err_set_unmap;
>  
> +	dmaengine_unmap_put(unmap);
> +
>  	atomic_inc(&pctx->dma_sync);
>  	dma_async_issue_pending(chan);
>  
> 

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2017-02-01 18:09 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-01-30 21:21 [PATCH] ntb: ntb_perf missing dmaengine_unmap_put Dave Jiang
2017-02-01 18:09 ` Jon Mason

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox