tracing: Update print fmt check to handle new __get_sockaddr() macro

A helper macro was added to make reading socket addresses easier in trace
events. It pairs %pISpc with __get_sockaddr() that reads the socket
address from the ring buffer into a human readable format.

The boot up check that makes sure that trace events do not reference
pointers to memory that can later be freed when the trace event is read,
incorrectly flagged this as a delayed reference. Update the check to
handle "__get_sockaddr" and not report an error on it.

Link: https://lore.kernel.org/all/[email protected]/

Reported-by: Stephen Rothwell <[email protected]>
Signed-off-by: Steven Rostedt (Google) <[email protected]>
Signed-off-by: Chuck Lever <[email protected]>
This commit is contained in:
Steven Rostedt (Google) authored and Chuck Lever committed 2022-02-28 10:26:38 -05:00
1 parent d07c9ad622
commit c6ced22997
1 file changed
+6
+6
View File
@@ -384,6 +384,12 @@ static void test_event_printk(struct trace_event_call *call)
if (!(dereference_flags & (1ULL << arg)))
goto next_arg;
/* Check for __get_sockaddr */;
if (str_has_prefix(fmt + i, "__get_sockaddr(")) {
dereference_flags &= ~(1ULL << arg);
goto next_arg;
}
/* Find the REC-> in the argument */
c = strchr(fmt + i, ',');
r = strstr(fmt + i, "REC->");