From: Doug Ledford <dledford@redhat.com>
To: Sebastian Ott <sebott@linux.vnet.ibm.com>,
Sean Hefty <sean.hefty@intel.com>,
Hal Rosenstock <hal.rosenstock@gmail.com>
Cc: linux-rdma@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] IB/core: fix unmap_sg argument
Date: Wed, 14 Dec 2016 14:21:55 -0500 [thread overview]
Message-ID: <eef9a03e-33c1-814c-e005-e135c17b7d78@redhat.com> (raw)
In-Reply-To: <alpine.LFD.2.20.1612021439450.3570@schleppi>
[-- Attachment #1.1: Type: text/plain, Size: 1218 bytes --]
On 12/2/2016 8:45 AM, Sebastian Ott wrote:
> __ib_umem_release calls dma_unmap_sg with a different number of
> sg_entries than ib_umem_get uses for dma_map_sg. This might cause
> trouble for implementations that merge sglist entries and results
> in the following dma debug complaint:
>
> DMA-API: device driver frees DMA sg list with different entry
> count [map count=2] [unmap count=1]
>
> Fix it by using the correct value.
>
> Signed-off-by: Sebastian Ott <sebott@linux.vnet.ibm.com>
> ---
> drivers/infiniband/core/umem.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/infiniband/core/umem.c b/drivers/infiniband/core/umem.c
> index 84b4eff..1e62a5f 100644
> --- a/drivers/infiniband/core/umem.c
> +++ b/drivers/infiniband/core/umem.c
> @@ -51,7 +51,7 @@ static void __ib_umem_release(struct ib_device *dev, struct ib_umem *umem, int d
>
> if (umem->nmap > 0)
> ib_dma_unmap_sg(dev, umem->sg_head.sgl,
> - umem->nmap,
> + umem->npages,
> DMA_BIDIRECTIONAL);
>
> for_each_sg(umem->sg_head.sgl, sg, umem->npages, i) {
>
Thanks, applied.
--
Doug Ledford <dledford@redhat.com>
GPG Key ID: 0E572FDD
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 884 bytes --]
prev parent reply other threads:[~2016-12-14 19:22 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-12-02 13:45 [PATCH] IB/core: fix unmap_sg argument Sebastian Ott
2016-12-13 15:10 ` [PATCH resend] " Sebastian Ott
2016-12-14 19:21 ` Doug Ledford [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=eef9a03e-33c1-814c-e005-e135c17b7d78@redhat.com \
--to=dledford@redhat.com \
--cc=hal.rosenstock@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-rdma@vger.kernel.org \
--cc=sean.hefty@intel.com \
--cc=sebott@linux.vnet.ibm.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