summaryrefslogtreecommitdiff
path: root/net/sunrpc/xprt.c
diff options
context:
space:
mode:
authorTrond Myklebust <trond.myklebust@primarydata.com>2017-10-13 21:08:55 +0300
committerTrond Myklebust <trond.myklebust@primarydata.com>2017-10-16 15:24:08 +0300
commit4c625a974fb81724e60966b677e47fcba782c950 (patch)
treeb2d8b4e3a8c3a591c52aff428e55f4f6f469e03a /net/sunrpc/xprt.c
parent33d930e59a98fa10a0db9f56c7fa2f21a4aef9b9 (diff)
downloadlinux-4c625a974fb81724e60966b677e47fcba782c950.tar.xz
SUNRPC: fix a list corruption issue in xprt_release()
We remove the request from the receive list before we call xprt_wait_on_pinned_rqst(), and so we need to use list_del_init(). Otherwise, we will see list corruption when xprt_complete_rqst() is called. Reported-by: Emre Celebi <emre@primarydata.com> Fixes: ce7c252a8c741 ("SUNRPC: Add a separate spinlock to protect...") Signed-off-by: Trond Myklebust <trond.myklebust@primarydata.com>
Diffstat (limited to 'net/sunrpc/xprt.c')
-rw-r--r--net/sunrpc/xprt.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/net/sunrpc/xprt.c b/net/sunrpc/xprt.c
index e741ec2b4d8e..1a39ad14c42f 100644
--- a/net/sunrpc/xprt.c
+++ b/net/sunrpc/xprt.c
@@ -1333,7 +1333,7 @@ void xprt_release(struct rpc_task *task)
rpc_count_iostats(task, task->tk_client->cl_metrics);
spin_lock(&xprt->recv_lock);
if (!list_empty(&req->rq_list)) {
- list_del(&req->rq_list);
+ list_del_init(&req->rq_list);
xprt_wait_on_pinned_rqst(req);
}
spin_unlock(&xprt->recv_lock);