Fix: sunrpc: null rpc_clnt dereference in rpc_task_queued tracepoint
authorMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Thu, 12 Dec 2019 15:29:02 +0000 (10:29 -0500)
committerMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Thu, 12 Dec 2019 15:45:54 +0000 (10:45 -0500)
Based on upstream Linux commit:

commit 0be283f676a1e7b208db0c992283197ef8b52158
Author: Benjamin Coddington <bcodding@redhat.com>
Date:   Tue Jan 23 09:32:35 2018 -0500

    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: Benjamin Coddington <bcodding@redhat.com>
Signed-off-by: Trond Myklebust <trondmy@gmail.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
instrumentation/events/lttng-module/rpc.h

index b3bbde506f51c61eb386860862c967ef7d9d0c65..b8e4ae60d8919873f706b06d066da866baf62b8d 100644 (file)
@@ -175,7 +175,8 @@ LTTNG_TRACEPOINT_EVENT_CLASS(rpc_task_queued,
 
        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(unsigned long, timeout, task->tk_timeout)
                ctf_integer(unsigned long, runstate, task->tk_runstate)
                ctf_integer(int, status, task->tk_status)
This page took 0.025424 seconds and 4 git commands to generate.