Commit 24b74bf0 authored by Trond Myklebust's avatar Trond Myklebust

SUNRPC: Fix a bug in call_decode()

call_verify() can, under certain circumstances, free the RPC slot. In that
case, our cached pointer 'req = task->tk_rqstp' is invalid. Bug was
introduced in commit 220bcc2a (SUNRPC:
Don't call xprt_release in call refresh).
Signed-off-by: default avatarTrond Myklebust <Trond.Myklebust@netapp.com>
parent 0490a54a
...@@ -1240,10 +1240,13 @@ call_decode(struct rpc_task *task) ...@@ -1240,10 +1240,13 @@ call_decode(struct rpc_task *task)
task->tk_status); task->tk_status);
return; return;
out_retry: out_retry:
req->rq_received = req->rq_private_buf.len = 0;
task->tk_status = 0; task->tk_status = 0;
if (task->tk_client->cl_discrtry) /* Note: call_verify() may have freed the RPC slot */
xprt_force_disconnect(task->tk_xprt); if (task->tk_rqstp == req) {
req->rq_received = req->rq_private_buf.len = 0;
if (task->tk_client->cl_discrtry)
xprt_force_disconnect(task->tk_xprt);
}
} }
/* /*
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment