android_kernel_oneplus_msm8998/net/sunrpc/xprtrdma
Sriharsha Basavapatna 294b0aadc8 svcrdma: avoid duplicate dma unmapping during error recovery
commit ce1ca7d2d140a1f4aaffd297ac487f246963dd2f upstream.

In rdma_read_chunk_frmr() when ib_post_send() fails, the error code path
invokes ib_dma_unmap_sg() to unmap the sg list. It then invokes
svc_rdma_put_frmr() which in turn tries to unmap the same sg list through
ib_dma_unmap_sg() again. This second unmap is invalid and could lead to
problems when the iova being unmapped is subsequently reused. Remove
the call to unmap in rdma_read_chunk_frmr() and let svc_rdma_put_frmr()
handle it.

Fixes: 412a15c0fe ("svcrdma: Port to new memory registration API")
Signed-off-by: Sriharsha Basavapatna <sriharsha.basavapatna@broadcom.com>
Reviewed-by: Chuck Lever <chuck.lever@oracle.com>
Reviewed-by: Yuval Shaia <yuval.shaia@oracle.com>
Signed-off-by: J. Bruce Fields <bfields@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-01-26 08:23:48 +01:00
..
backchannel.c NFS: Enable client side NFSv4.1 backchannel to use other transports 2015-11-02 16:29:13 -05:00
fmr_ops.c xprtrdma: Replace global lkey with lkey local to PD 2015-09-25 10:46:51 -04:00
frwr_ops.c NFS client updates for Linux 4.4 2015-11-09 18:11:22 -08:00
Makefile xprtrdma: Pre-allocate backward rpc_rqst and send/receive buffers 2015-11-02 13:45:15 -05:00
module.c rpcrdma: Merge svcrdma and xprtrdma modules into one 2015-06-04 16:56:02 -04:00
physical_ops.c xprtrdma: Replace global lkey with lkey local to PD 2015-09-25 10:46:51 -04:00
rpc_rdma.c xprtrdma: Handle incoming backward direction RPC calls 2015-11-02 13:45:15 -05:00
svc_rdma.c svcrdma: Add backward direction service for RPC/RDMA transport 2015-11-02 13:45:15 -05:00
svc_rdma_marshal.c svcrdma: Keep rpcrdma_msg fields in network byte-order 2015-06-04 16:55:59 -04:00
svc_rdma_recvfrom.c svcrdma: avoid duplicate dma unmapping during error recovery 2017-01-26 08:23:48 +01:00
svc_rdma_sendto.c IB: split struct ib_send_wr 2015-10-08 11:09:10 +01:00
svc_rdma_transport.c NFS client updates for Linux 4.4 2015-11-09 18:11:22 -08:00
transport.c NFS: Enable client side NFSv4.1 backchannel to use other transports 2015-11-02 16:29:13 -05:00
verbs.c NFS client updates for Linux 4.4 2015-11-09 18:11:22 -08:00
xprt_rdma.h NFS client updates for Linux 4.4 2015-11-09 18:11:22 -08:00