mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-29 07:04:10 +08:00
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: ce7c252a8c
("SUNRPC: Add a separate spinlock to protect...")
Signed-off-by: Trond Myklebust <trond.myklebust@primarydata.com>
This commit is contained in:
parent
33d930e59a
commit
4c625a974f
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user