From: Trond Myklebust Date: Wed, 26 Aug 2015 20:17:53 +0000 (-0600) Subject: SUNRPC: xprt_complete_bc_request must also decrement the free slot count X-Git-Tag: v4.1.12-92~278^2^2~12 X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=aefbea48217a81d02934ed9ad21c7a117183ba4a;p=users%2Fjedix%2Flinux-maple.git SUNRPC: xprt_complete_bc_request must also decrement the free slot count [ Upstream commit 1980bd4d829a87ccd21b949f8a11ff1b426f5b0b ] Calling xprt_complete_bc_request() effectively causes the slot to be allocated, so it needs to decrement the backchannel free slot count as well. Fixes: 0d2a970d0ae5 ("SUNRPC: Fix a backchannel race") Signed-off-by: Trond Myklebust --- diff --git a/net/sunrpc/backchannel_rqst.c b/net/sunrpc/backchannel_rqst.c index c111a2d9bc1f9..41c88c61a2cdb 100644 --- a/net/sunrpc/backchannel_rqst.c +++ b/net/sunrpc/backchannel_rqst.c @@ -336,7 +336,7 @@ void xprt_complete_bc_request(struct rpc_rqst *req, uint32_t copied) spin_lock(&xprt->bc_pa_lock); list_del(&req->rq_bc_pa_list); - xprt->bc_alloc_count--; + xprt_dec_alloc_count(xprt, 1); spin_unlock(&xprt->bc_pa_lock); req->rq_private_buf.len = copied;