1
linux/drivers/net/ethernet/sfc
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
..
falcon Merge branch 'net-make-timestamping-selectable' 2024-07-15 08:02:30 -07:00
siena sfc: Don't invoke xdp_do_flush() from netpoll. 2024-10-03 15:42:00 -07:00
bitfield.h
ef10_regs.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500 2019-06-19 17:09:55 +02:00
ef10_sriov.c
ef10_sriov.h
ef10.c sfc: Add X4 PF support 2024-09-11 16:02:21 -07:00
ef100_ethtool.c ethtool: rss: don't report key if device doesn't support it 2024-08-12 14:16:24 +01:00
ef100_ethtool.h
ef100_netdev.c
ef100_netdev.h sfc: hook up ef100 representor TX 2022-07-22 12:50:06 +01:00
ef100_nic.c
ef100_nic.h sfc: add support for devlink port_function_hw_addr_get in ef100 2023-02-16 12:03:13 +01:00
ef100_regs.h
ef100_rep.c netdev_features: convert NETIF_F_LLTX to dev->lltx 2024-09-03 11:36:43 +02:00
ef100_rep.h sfc: add support for devlink port_function_hw_addr_get in ef100 2023-02-16 12:03:13 +01:00
ef100_rx.c sfc: add ability for extra channels to receive raw RX buffers 2022-11-16 09:07:02 +00:00
ef100_rx.h
ef100_sriov.c
ef100_sriov.h
ef100_tx.c sfc: Remove struct efx_special_buffer 2023-07-28 09:54:17 +01:00
ef100_tx.h
ef100.c
ef100.h sfc: skeleton EF100 PF driver 2020-07-27 12:26:55 -07:00
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: use new rxfh_context API 2024-06-28 18:53:21 -07:00
efx_common.h
efx_devlink.c
efx_devlink.h
efx.c sfc: Add X4 PF support 2024-09-11 16:02:21 -07:00
efx.h sfc: use new rxfh_context API 2024-06-28 18:53:21 -07:00
enum.h
ethtool_common.c sfc: remove get_rxfh_context dead code 2024-06-28 18:53:21 -07:00
ethtool_common.h sfc: use new rxfh_context API 2024-06-28 18:53:21 -07:00
ethtool.c sfc: Remove setting of RX software timestamp 2024-09-09 17:44:41 -07:00
filter.h
io.h
Kconfig
mae_counter_format.h sfc: add extra RX channel to receive MAE counter updates on ef100 2022-11-16 09:07:02 +00:00
mae.c
mae.h
Makefile
mcdi_filters.c sfc: use new rxfh_context API 2024-06-28 18:53:21 -07:00
mcdi_filters.h sfc: use new rxfh_context API 2024-06-28 18:53:21 -07:00
mcdi_functions.c
mcdi_functions.h
mcdi_mon.c net: ethernet: move from strlcpy with unused retval to strscpy 2022-08-31 14:11:26 -07:00
mcdi_pcol_mae.h sfc: insert default MAE rules to connect VFs to representors 2022-07-29 21:22:06 -07:00
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: use new rxfh_context API 2024-06-28 18:53:21 -07:00
nic_common.h sfc: Add X4 PF support 2024-09-11 16:02:21 -07:00
nic.c
nic.h sfc: Add X4 PF support 2024-09-11 16:02:21 -07:00
ptp.c sfc: convert comma to semicolon 2024-09-06 18:06:40 -07:00
ptp.h net: Add struct kernel_ethtool_ts_info 2024-07-15 08:02:26 -07:00
rx_common.c sfc: use new rxfh_context API 2024-06-28 18:53:21 -07:00
rx_common.h sfc: use new rxfh_context API 2024-06-28 18:53:21 -07:00
rx.c
selftest.c
selftest.h
sriov.c
sriov.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500 2019-06-19 17:09:55 +02:00
tc_bindings.c
tc_bindings.h sfc: do not try to call tc functions when CONFIG_SFC_SRIOV=n 2023-06-16 09:12:18 +01:00
tc_conntrack.c
tc_conntrack.h
tc_counters.c sfc: Convert to use ERR_CAST() 2024-08-30 11:10:02 -07:00
tc_counters.h
tc_encap_actions.c
tc_encap_actions.h sfc: do not try to call tc functions when CONFIG_SFC_SRIOV=n 2023-06-16 09:12:18 +01:00
tc.c sfc: use flow_rule_is_supp_enc_control_flags() 2024-06-12 17:56:00 -07:00
tc.h
tx_common.c net: adopt skb_network_offset() and similar helpers 2024-03-04 08:47:06 +00:00
tx_common.h
tx_tso.c net: adopt skb_network_offset() and similar helpers 2024-03-04 08:47:06 +00:00
tx.c
tx.h
workarounds.h