linux-rdma.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jason Gunthorpe <jgg@ziepe.ca>
To: Chuck Lever <chuck.lever@oracle.com>
Cc: anna.schumaker@netapp.com, linux-nfs@vger.kernel.org,
	linux-rdma@vger.kernel.org
Subject: Re: [PATCH v3 1/2] xprtrdma: Fix DMA scatter-gather list mapping imbalance
Date: Wed, 12 Feb 2020 14:26:38 -0400	[thread overview]
Message-ID: <20200212182638.GA31668@ziepe.ca> (raw)
In-Reply-To: <158152394998.433502.5623790463334839091.stgit@morisot.1015granger.net>

On Wed, Feb 12, 2020 at 11:12:30AM -0500, Chuck Lever wrote:
> The @nents value that was passed to ib_dma_map_sg() has to be passed
> to the matching ib_dma_unmap_sg() call. If ib_dma_map_sg() choses to
> concatenate sg entries, it will return a different nents value than
> it was passed.
> 
> The bug was exposed by recent changes to the AMD IOMMU driver, which
> enabled sg entry concatenation.
> 
> Looking all the way back to commit 4143f34e01e9 ("xprtrdma: Port to
> new memory registration API") and reviewing other kernel ULPs, it's
> not clear that the frwr_map() logic was ever correct for this case.
> 
> Reported-by: Andre Tomt <andre@tomt.net>
> Suggested-by: Robin Murphy <robin.murphy@arm.com>
> Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
> Cc: stable@vger.kernel.org # v5.5
> ---
>  net/sunrpc/xprtrdma/frwr_ops.c |   13 +++++++------
>  1 file changed, 7 insertions(+), 6 deletions(-)

Yep

Reviewed-by: Jason Gunthorpe <jgg@mellanox.com>

Jason

  reply	other threads:[~2020-02-12 18:26 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-02-12 16:12 [PATCH v3 0/2] Fix NFS/RDMA operation with Ryzen IOMMU Chuck Lever
2020-02-12 16:12 ` [PATCH v3 1/2] xprtrdma: Fix DMA scatter-gather list mapping imbalance Chuck Lever
2020-02-12 18:26   ` Jason Gunthorpe [this message]
2020-02-12 18:38     ` Chuck Lever
2020-02-12 19:05       ` Jason Gunthorpe
2020-02-12 19:09         ` Chuck Lever
2020-02-12 19:30           ` Jason Gunthorpe
2020-02-13 14:33             ` Chuck Lever
2020-02-13 14:56               ` Jason Gunthorpe
2020-02-12 16:12 ` [PATCH v3 2/2] xprtrdma: Enhance MR-related trace points Chuck Lever

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=20200212182638.GA31668@ziepe.ca \
    --to=jgg@ziepe.ca \
    --cc=anna.schumaker@netapp.com \
    --cc=chuck.lever@oracle.com \
    --cc=linux-nfs@vger.kernel.org \
    --cc=linux-rdma@vger.kernel.org \
    /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;
as well as URLs for NNTP newsgroup(s).