Commit 0be283f6 authored by Benjamin Coddington's avatar Benjamin Coddington Committed by Trond Myklebust

SUNRPC: Fix null rpc_clnt dereference in rpc_task_queued tracepoint

Backchannel tasks will not have a reference to the rpc_clnt.  Return -1 for
cl_clid in that case.
Signed-off-by: default avatarBenjamin Coddington <bcodding@redhat.com>
Signed-off-by: default avatarTrond Myklebust <trondmy@gmail.com>
parent 49686cbb
...@@ -175,7 +175,7 @@ DECLARE_EVENT_CLASS(rpc_task_queued, ...@@ -175,7 +175,7 @@ DECLARE_EVENT_CLASS(rpc_task_queued,
), ),
TP_fast_assign( TP_fast_assign(
__entry->client_id = clnt->cl_clid; __entry->client_id = clnt ? clnt->cl_clid : -1;
__entry->task_id = task->tk_pid; __entry->task_id = task->tk_pid;
__entry->timeout = task->tk_timeout; __entry->timeout = task->tk_timeout;
__entry->runstate = task->tk_runstate; __entry->runstate = task->tk_runstate;
...@@ -184,7 +184,7 @@ DECLARE_EVENT_CLASS(rpc_task_queued, ...@@ -184,7 +184,7 @@ DECLARE_EVENT_CLASS(rpc_task_queued,
__assign_str(q_name, rpc_qname(q)); __assign_str(q_name, rpc_qname(q));
), ),
TP_printk("task:%u@%u flags=%4.4x state=%4.4lx status=%d timeout=%lu queue=%s", TP_printk("task:%u@%d flags=%4.4x state=%4.4lx status=%d timeout=%lu queue=%s",
__entry->task_id, __entry->client_id, __entry->task_id, __entry->client_id,
__entry->flags, __entry->flags,
__entry->runstate, __entry->runstate,
......
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