linux_dsm_epyc7002/net/sunrpc/xprtrdma
Chuck Lever d698c4a02e xprtrdma: Fix backchannel allocation of extra rpcrdma_reps
The backchannel code uses rpcrdma_recv_buffer_put to add new reps
to the free rep list. This also decrements rb_recv_count, which
spoofs the receive overrun logic in rpcrdma_buffer_get_rep.

Commit 9b06688bc3 ("xprtrdma: Fix additional uses of
spin_lock_irqsave(rb_lock)") replaced the original open-coded
list_add with a call to rpcrdma_recv_buffer_put(), but then a year
later, commit 05c974669e ("xprtrdma: Fix receive buffer
accounting") added rep accounting to rpcrdma_recv_buffer_put.
It was an oversight to let the backchannel continue to use this
function.

The fix this, let's combine the "add to free list" logic with
rpcrdma_create_rep.

Also, do not allocate RPCRDMA_MAX_BC_REQUESTS rpcrdma_reps in
rpcrdma_buffer_create and then allocate additional rpcrdma_reps in
rpcrdma_bc_setup_reps. Allocating the extra reps during backchannel
set-up is sufficient.

Fixes: 05c974669e ("xprtrdma: Fix receive buffer accounting")
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Signed-off-by: Anna Schumaker <Anna.Schumaker@Netapp.com>
2018-01-16 11:19:41 -05:00
..
backchannel.c xprtrdma: Fix backchannel allocation of extra rpcrdma_reps 2018-01-16 11:19:41 -05:00
fmr_ops.c NFS client updates for Linux 4.15 2017-11-17 14:18:00 -08:00
frwr_ops.c NFS client updates for Linux 4.15 2017-11-17 14:18:00 -08:00
Makefile License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
module.c rpcrdma: Merge svcrdma and xprtrdma modules into one 2015-06-04 16:56:02 -04:00
rpc_rdma.c xprtrdma: Spread reply processing over more CPUs 2017-12-15 14:31:50 -05:00
svc_rdma_backchannel.c Lots of good bugfixes, including: 2017-11-18 11:22:04 -08:00
svc_rdma_recvfrom.c svcrdma: Properly compute .len and .buflen for received RPC Calls 2017-07-12 15:54:57 -04:00
svc_rdma_rw.c License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
svc_rdma_sendto.c svcrdma: fix an incorrect check on -E2BIG and -EINVAL 2017-07-13 14:18:47 -04:00
svc_rdma_transport.c svcrdma: Enqueue after setting XPT_CLOSE in completion handlers 2017-11-07 16:44:02 -05:00
svc_rdma.c svcrdma: Reduce size of sge array in struct svc_rdma_op_ctxt 2017-04-25 17:25:55 -04:00
transport.c xprtrdma: Fix buffer leak after transport set up failure 2018-01-16 11:19:41 -05:00
verbs.c xprtrdma: Fix backchannel allocation of extra rpcrdma_reps 2018-01-16 11:19:41 -05:00
xprt_rdma.h xprtrdma: Fix backchannel allocation of extra rpcrdma_reps 2018-01-16 11:19:41 -05:00