Re: NULL pointer deref inside xdp_do_flush due to bpf_net_ctx_get_all_used_flush_lists

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

 



On 2024-10-01 15:01:25 [+0100], Edward Cree wrote:
> On 01/10/2024 14:36, Sebastian Andrzej Siewior wrote:
> > diff --git a/drivers/net/ethernet/sfc/efx_channels.c b/drivers/net/ethernet/sfc/efx_channels.c
> > index c9e17a8208a90..f3288e02c1bd8 100644
> > --- a/drivers/net/ethernet/sfc/efx_channels.c
> > +++ b/drivers/net/ethernet/sfc/efx_channels.c
> > @@ -1260,7 +1260,8 @@ static int efx_poll(struct napi_struct *napi, int budget)
> >  
> >  	spent = efx_process_channel(channel, budget);
> >  
> > -	xdp_do_flush();
> > +	if (spent)
> > +		xdp_do_flush();
> >  
> >  	if (spent < budget) {
> >  		if (efx_channel_has_rx_queue(channel) &&
> 
> Seems reasonable to me.
> Another alternative is to look at budget rather than spent,
>  as that seems like the condition that drives whether we
>  have a real XDP.

If you prefer. What are chances that you had budget but cleaned nothing?

> -ed

Sebastian




[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