Fix: SUNRPC: Fix oops when trace sunrpc_task events in nfs client
[lttng-modules.git] / instrumentation / events / lttng-module / rpc.h
index 4239280cd1955ad72773c8b98fb209c2f76b25e1..b3bbde506f51c61eb386860862c967ef7d9d0c65 100644 (file)
@@ -138,7 +138,7 @@ LTTNG_TRACEPOINT_EVENT_CLASS(rpc_task_running,
 
        TP_FIELDS(
                ctf_integer(unsigned int, task_id, task->tk_pid)
-               ctf_integer(unsigned int, client_id, task->tk_client->cl_clid)
+               ctf_integer(unsigned int, client_id, task->tk_client ? task->tk_client->cl_clid : -1)
                ctf_integer_hex(const void *, action, action)
                ctf_integer(unsigned long, runstate, task->tk_runstate)
                ctf_integer(int, status, task->tk_status)
@@ -207,7 +207,7 @@ LTTNG_TRACEPOINT_EVENT_CLASS(rpc_task_running,
 
        TP_FIELDS(
                ctf_integer(unsigned int, task_id, task->tk_pid)
-               ctf_integer(unsigned int, client_id, task->tk_client->cl_clid)
+               ctf_integer(unsigned int, client_id, task->tk_client ? task->tk_client->cl_clid : -1)
                ctf_integer_hex(const void *, action, action)
                ctf_integer(unsigned long, runstate, task->tk_runstate)
                ctf_integer(int, status, task->tk_status)
This page took 0.023866 seconds and 4 git commands to generate.