diff options
Diffstat (limited to 'meta/recipes-kernel/lttng/lttng-modules/0003-Fix-sunrpc-use-signed-integer-for-client-id.patch')
-rw-r--r-- | meta/recipes-kernel/lttng/lttng-modules/0003-Fix-sunrpc-use-signed-integer-for-client-id.patch | 105 |
1 files changed, 0 insertions, 105 deletions
diff --git a/meta/recipes-kernel/lttng/lttng-modules/0003-Fix-sunrpc-use-signed-integer-for-client-id.patch b/meta/recipes-kernel/lttng/lttng-modules/0003-Fix-sunrpc-use-signed-integer-for-client-id.patch deleted file mode 100644 index c7529f16dd..0000000000 --- a/meta/recipes-kernel/lttng/lttng-modules/0003-Fix-sunrpc-use-signed-integer-for-client-id.patch +++ /dev/null | |||
@@ -1,105 +0,0 @@ | |||
1 | From 70389e422dd3146161089d454f525367c9046ecd Mon Sep 17 00:00:00 2001 | ||
2 | From: Mathieu Desnoyers <mathieu.desnoyers@efficios.com> | ||
3 | Date: Thu, 12 Dec 2019 10:29:37 -0500 | ||
4 | Subject: [PATCH 3/4] Fix: sunrpc: use signed integer for client id | ||
5 | |||
6 | Within include/linux/sunrpc/clnt.h:struct rpc_cltn, the cl_clid field | ||
7 | is an unsigned integer, which is the type expected by the tracepoint | ||
8 | signature. | ||
9 | |||
10 | However, looking into net/sunrpc/clnt.c:rpc_alloc_clid(), its allocation | ||
11 | considers negative signed integer as errors. | ||
12 | |||
13 | Therefore, in order to properly show "-1" in the trace output (rather | ||
14 | than MAX_INT) when called with a NULL task->tk_client, move to a | ||
15 | signed integer as backing type for the client_id field. | ||
16 | |||
17 | Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com> | ||
18 | Upstream-Status: Backport [https://github.com/lttng/lttng-modules/commit/cc7bb0aa52cae22255581d67841449bb8ea36fda] | ||
19 | Signed-off-by: Quanyang Wang <quanyang.wang@windriver.com> | ||
20 | --- | ||
21 | instrumentation/events/lttng-module/rpc.h | 19 +++++++++++-------- | ||
22 | 1 file changed, 11 insertions(+), 8 deletions(-) | ||
23 | |||
24 | diff --git a/instrumentation/events/lttng-module/rpc.h b/instrumentation/events/lttng-module/rpc.h | ||
25 | index 68c622c..2d06e55 100644 | ||
26 | --- a/instrumentation/events/lttng-module/rpc.h | ||
27 | +++ b/instrumentation/events/lttng-module/rpc.h | ||
28 | @@ -18,7 +18,7 @@ LTTNG_TRACEPOINT_EVENT_CLASS(rpc_task_status, | ||
29 | |||
30 | TP_FIELDS( | ||
31 | ctf_integer(unsigned int, task_id, task->tk_pid) | ||
32 | - ctf_integer(unsigned int, client_id, task->tk_client->cl_clid) | ||
33 | + ctf_integer(int, client_id, task->tk_client->cl_clid) | ||
34 | ctf_integer(int, status, task->tk_status) | ||
35 | ) | ||
36 | ) | ||
37 | @@ -43,7 +43,7 @@ LTTNG_TRACEPOINT_EVENT_CLASS(rpc_task_status, | ||
38 | |||
39 | TP_FIELDS( | ||
40 | ctf_integer(unsigned int, task_id, task->tk_pid) | ||
41 | - ctf_integer(unsigned int, client_id, task->tk_client->cl_clid) | ||
42 | + ctf_integer(int, client_id, task->tk_client->cl_clid) | ||
43 | ctf_integer(int, status, task->tk_status) | ||
44 | ) | ||
45 | ) | ||
46 | @@ -100,7 +100,7 @@ LTTNG_TRACEPOINT_EVENT(rpc_connect_status, | ||
47 | |||
48 | TP_FIELDS( | ||
49 | ctf_integer(unsigned int, task_id, task->tk_pid) | ||
50 | - ctf_integer(unsigned int, client_id, task->tk_client->cl_clid) | ||
51 | + ctf_integer(int, client_id, task->tk_client->cl_clid) | ||
52 | ctf_integer(int, status, task->tk_status) | ||
53 | ) | ||
54 | ) | ||
55 | @@ -112,7 +112,7 @@ LTTNG_TRACEPOINT_EVENT(rpc_connect_status, | ||
56 | |||
57 | TP_FIELDS( | ||
58 | ctf_integer(unsigned int, task_id, task->tk_pid) | ||
59 | - ctf_integer(unsigned int, client_id, task->tk_client->cl_clid) | ||
60 | + ctf_integer(int, client_id, task->tk_client->cl_clid) | ||
61 | ctf_integer(int, status, status) | ||
62 | ) | ||
63 | ) | ||
64 | @@ -139,7 +139,8 @@ LTTNG_TRACEPOINT_EVENT_CLASS(rpc_task_running, | ||
65 | |||
66 | TP_FIELDS( | ||
67 | ctf_integer(unsigned int, task_id, task->tk_pid) | ||
68 | - ctf_integer(unsigned int, client_id, task->tk_client ? task->tk_client->cl_clid : -1) | ||
69 | + ctf_integer(int, client_id, task->tk_client ? | ||
70 | + task->tk_client->cl_clid : -1) | ||
71 | ctf_integer_hex(const void *, action, action) | ||
72 | ctf_integer(unsigned long, runstate, task->tk_runstate) | ||
73 | ctf_integer(int, status, task->tk_status) | ||
74 | @@ -176,7 +177,7 @@ LTTNG_TRACEPOINT_EVENT_CLASS(rpc_task_queued, | ||
75 | |||
76 | TP_FIELDS( | ||
77 | ctf_integer(unsigned int, task_id, task->tk_pid) | ||
78 | - ctf_integer(unsigned int, client_id, task->tk_client ? | ||
79 | + ctf_integer(int, client_id, task->tk_client ? | ||
80 | task->tk_client->cl_clid : -1) | ||
81 | ctf_integer(unsigned long, timeout, task->tk_timeout) | ||
82 | ctf_integer(unsigned long, runstate, task->tk_runstate) | ||
83 | @@ -209,7 +210,8 @@ LTTNG_TRACEPOINT_EVENT_CLASS(rpc_task_running, | ||
84 | |||
85 | TP_FIELDS( | ||
86 | ctf_integer(unsigned int, task_id, task->tk_pid) | ||
87 | - ctf_integer(unsigned int, client_id, task->tk_client ? task->tk_client->cl_clid : -1) | ||
88 | + ctf_integer(int, client_id, task->tk_client ? | ||
89 | + task->tk_client->cl_clid : -1) | ||
90 | ctf_integer_hex(const void *, action, action) | ||
91 | ctf_integer(unsigned long, runstate, task->tk_runstate) | ||
92 | ctf_integer(int, status, task->tk_status) | ||
93 | @@ -246,7 +248,8 @@ LTTNG_TRACEPOINT_EVENT_CLASS(rpc_task_queued, | ||
94 | |||
95 | TP_FIELDS( | ||
96 | ctf_integer(unsigned int, task_id, task->tk_pid) | ||
97 | - ctf_integer(unsigned int, client_id, task->tk_client->cl_clid) | ||
98 | + ctf_integer(int, client_id, task->tk_client ? | ||
99 | + task->tk_client->cl_clid : -1) | ||
100 | ctf_integer(unsigned long, timeout, task->tk_timeout) | ||
101 | ctf_integer(unsigned long, runstate, task->tk_runstate) | ||
102 | ctf_integer(int, status, task->tk_status) | ||
103 | -- | ||
104 | 2.17.1 | ||
105 | |||