]> 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)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 23 Sep 2022 12:14:02 +0000 (14:14 +0200)
commitdce19409fb744f592dd8646ee5c16bed6deffc01
tree3415f86d9f645f92d83bb278226e42e182729da1
parentfe0a6a2369d877b8e3fa79e42fb5a1dbf52ea5b6
SUNRPC: Fix call completion races with call_decode()

[ Upstream commit 17814819ac9829a437e06fbb5c7056a1f4f893da ]

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>
Signed-off-by: Sasha Levin <sashal@kernel.org>
net/sunrpc/xprt.c