Commit aed28b7a authored by Chuck Lever's avatar Chuck Lever Committed by Anna Schumaker

SUNRPC: Don't dereference xprt->snd_task if it's a cookie

Fixes: e26d9972 ("SUNRPC: Clean up scheduling of autoclose")
Signed-off-by: default avatarChuck Lever <chuck.lever@oracle.com>
Signed-off-by: default avatarAnna Schumaker <Anna.Schumaker@Netapp.com>
parent c0f26167
......@@ -965,7 +965,8 @@ TRACE_EVENT(rpc_socket_nospace,
{ BIT(XPRT_REMOVE), "REMOVE" }, \
{ BIT(XPRT_CONGESTED), "CONGESTED" }, \
{ BIT(XPRT_CWND_WAIT), "CWND_WAIT" }, \
{ BIT(XPRT_WRITE_SPACE), "WRITE_SPACE" })
{ BIT(XPRT_WRITE_SPACE), "WRITE_SPACE" }, \
{ BIT(XPRT_SND_IS_COOKIE), "SND_IS_COOKIE" })
DECLARE_EVENT_CLASS(rpc_xprt_lifetime_class,
TP_PROTO(
......@@ -1162,8 +1163,11 @@ DECLARE_EVENT_CLASS(xprt_writelock_event,
__entry->task_id = -1;
__entry->client_id = -1;
}
__entry->snd_task_id = xprt->snd_task ?
xprt->snd_task->tk_pid : -1;
if (xprt->snd_task &&
!test_bit(XPRT_SND_IS_COOKIE, &xprt->state))
__entry->snd_task_id = xprt->snd_task->tk_pid;
else
__entry->snd_task_id = -1;
),
TP_printk(SUNRPC_TRACE_TASK_SPECIFIER
......@@ -1208,8 +1212,12 @@ DECLARE_EVENT_CLASS(xprt_cong_event,
__entry->task_id = -1;
__entry->client_id = -1;
}
__entry->snd_task_id = xprt->snd_task ?
xprt->snd_task->tk_pid : -1;
if (xprt->snd_task &&
!test_bit(XPRT_SND_IS_COOKIE, &xprt->state))
__entry->snd_task_id = xprt->snd_task->tk_pid;
else
__entry->snd_task_id = -1;
__entry->cong = xprt->cong;
__entry->cwnd = xprt->cwnd;
__entry->wait = test_bit(XPRT_CWND_WAIT, &xprt->state);
......
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