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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, 9 Mar 2022 21:47:38 +0100
Sebastian Andrzej Siewior <bigeasy@xxxxxxxxxxxxx> wrote:

> --- 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;
>  }
>  



[Index of Archives]     [Linux Samsung SoC]     [Linux Rockchip SoC]     [Linux Actions SoC]     [Linux for Synopsys ARC Processors]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]


  Powered by Linux