Re: [PATCH net] sfc: Don't invoke xdp_do_flush() from netpoll.

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

 



On 02/10/2024 13:58, Sebastian Andrzej Siewior wrote:
> Yury reported a crash in the sfc driver originated from
> netpoll_send_udp(). The netconsole sends a message and then netpoll
> invokes the driver's NAPI function with a budget of zero. It is
> dedicated to allow driver to free TX resources, that it may have used
> while sending the packet.
> 
> In the netpoll case the driver invokes xdp_do_flush() unconditionally,
> leading to crash because bpf_net_context was never assigned.
> 
> Invoke xdp_do_flush() only if budget is not zero.
> 
> Fixes: 401cb7dae8130 ("net: Reference bpf_redirect_info via task_struct on PREEMPT_RT.")
> Reported-by: Yury Vostrikov <mon@xxxxxxxxxxx>
> Closes: https://lore.kernel.org/5627f6d1-5491-4462-9d75-bc0612c26a22@xxxxxxxxxxxxxxxx
> Signed-off-by: Sebastian Andrzej Siewior <bigeasy@xxxxxxxxxxxxx>

Reviewed-by: Edward Cree <ecree.xilinx@xxxxxxxxx>




[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