]> git.itanic.dy.fi Git - linux-stable/commit
SUNRPC: Fix call completion races with call_decode()
authorTrond Myklebust <trond.myklebust@hammerspace.com>
Wed, 31 Aug 2022 21:28:13 +0000 (17:28 -0400)
committerTrond Myklebust <trond.myklebust@hammerspace.com>
Thu, 1 Sep 2022 14:40:37 +0000 (10:40 -0400)
commit17814819ac9829a437e06fbb5c7056a1f4f893da
tree5943e21a6aea0ec1fb55cd9fc21dbd287f7d7161
parented06fce0b034b2e25bd93430f5c4cbb28036cc1a
SUNRPC: Fix call completion races with call_decode()

We need to make sure that the req->rq_private_buf is completely up to
date before we make req->rq_reply_bytes_recvd visible to the
call_decode() routine in order to avoid triggering the WARN_ON().

Reported-by: Benjamin Coddington <bcodding@redhat.com>
Fixes: 72691a269f0b ("SUNRPC: Don't reuse bvec on retransmission of the request")
Tested-by: Benjamin Coddington <bcodding@redhat.com>
Signed-off-by: Trond Myklebust <trond.myklebust@hammerspace.com>
net/sunrpc/xprt.c