Thread (3 messages) flat view 3 messages, 3 authors, 2022-03-09

Re: [PATCH net v2] xdp: xdp_mem_allocator can be NULL in trace_mem_connect().

From: Steven Rostedt <rostedt@goodmis.org>
Date: 2022-03-09 21:36:21
Also in: bpf

On Wed, 9 Mar 2022 21:47:38 +0100
Sebastian Andrzej Siewior [off-list ref] wrote:
quoted hunk ↗ jump to hunk
--- a/net/core/xdp.c
+++ b/net/core/xdp.c
@@ -357,7 +357,8 @@ int xdp_rxq_info_reg_mem_model(struct xdp_rxq_info *xdp_rxq,
 	if (IS_ERR(xdp_alloc))
 		return PTR_ERR(xdp_alloc);
 
-	trace_mem_connect(xdp_alloc, xdp_rxq);
+	if (xdp_alloc)
Eliminate the check when tracing is disabled:

	if (trace_mem_connect_enabled() && xdp_alloc)

-- Steve

+		trace_mem_connect(xdp_alloc, xdp_rxq);
 	return 0;
 }
 
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help