linux-yocto/drivers/net/ethernet/sfc/siena
Sebastian Andrzej Siewior 55e802468e sfc: Don't invoke xdp_do_flush() from netpoll.
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: 401cb7dae8 ("net: Reference bpf_redirect_info via task_struct on PREEMPT_RT.")
Reported-by: Yury Vostrikov <mon@unformed.ru>
Closes: https://lore.kernel.org/5627f6d1-5491-4462-9d75-bc0612c26a22@app.fastmail.com
Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Reviewed-by: Edward Cree <ecree.xilinx@gmail.com>
Link: https://patch.msgid.link/20241002125837.utOcRo6Y@linutronix.de
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2024-10-03 15:42:00 -07:00
..
bitfield.h
efx_channels.c sfc: Don't invoke xdp_do_flush() from netpoll. 2024-10-03 15:42:00 -07:00
efx_channels.h
efx_common.c sfc: siena: rip out rss-context dead code 2024-09-06 18:22:17 -07:00
efx_common.h
efx.c sfc-siena: Implement ndo_hwtstamp_(get|set) 2023-12-05 07:45:43 -08:00
efx.h
enum.h
ethtool_common.c sfc: siena: rip out rss-context dead code 2024-09-06 18:22:17 -07:00
ethtool_common.h net: ethtool: get rid of get/set_rxfh_context functions 2023-12-13 22:07:16 -08:00
ethtool.c sfc/siena: Remove setting of RX software timestamp 2024-09-09 17:44:41 -07:00
farch_regs.h
farch.c
filter.h
io.h asm-generic/iomap.h: remove ARCH_HAS_IOREMAP_xx macros 2023-08-18 10:12:32 -07:00
Kconfig
Makefile
mcdi_mon.c
mcdi_pcol.h
mcdi_port_common.c
mcdi_port_common.h
mcdi_port.c
mcdi_port.h
mcdi.c
mcdi.h
mtd.c
net_driver.h sfc: siena: rip out rss-context dead code 2024-09-06 18:22:17 -07:00
nic_common.h
nic.c
nic.h
ptp.c sfc/siena: Convert comma to semicolon 2024-09-06 18:06:30 -07:00
ptp.h net: Add struct kernel_ethtool_ts_info 2024-07-15 08:02:26 -07:00
rx_common.c sfc: siena: rip out rss-context dead code 2024-09-06 18:22:17 -07:00
rx_common.h sfc: siena: rip out rss-context dead code 2024-09-06 18:22:17 -07:00
rx.c
selftest.c sfc: allocate a big enough SKB for loopback selftest packet 2023-08-22 11:09:53 -07:00
selftest.h
siena_sriov.c
siena_sriov.h
siena.c sfc-siena: Implement ndo_hwtstamp_(get|set) 2023-12-05 07:45:43 -08:00
sriov.h
tx_common.c net: adopt skb_network_offset() and similar helpers 2024-03-04 08:47:06 +00:00
tx_common.h
tx.c
tx.h
vfdi.h
workarounds.h