Linux PCI Non-Transparent Bridge framework and drivers
 help / color / mirror / Atom feed
From: Jon Mason <jdmason@kudzu.us>
To: Dave Jiang <dave.jiang@intel.com>
Cc: linux-ntb@googlegroups.com, allen.hubbe@emc.com
Subject: Re: [PATCH] ntb: ntb_perf missing dmaengine_unmap_put
Date: Wed, 1 Feb 2017 13:09:44 -0500	[thread overview]
Message-ID: <20170201180943.GA24153@kudzu.us> (raw)
In-Reply-To: <148581127718.58806.1803127910265426156.stgit@djiang5-desk3.ch.intel.com>

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);
>  
> 

      reply	other threads:[~2017-02-01 18:09 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-01-30 21:21 [PATCH] ntb: ntb_perf missing dmaengine_unmap_put Dave Jiang
2017-02-01 18:09 ` Jon Mason [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20170201180943.GA24153@kudzu.us \
    --to=jdmason@kudzu.us \
    --cc=allen.hubbe@emc.com \
    --cc=dave.jiang@intel.com \
    --cc=linux-ntb@googlegroups.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox