1
0
Fork 0
mirror of synced 2025-03-06 20:59:54 +01:00
linux/drivers/net/ethernet/sfc
Eric Dumazet 1eb2cded45 net: annotate writes on dev->mtu from ndo_change_mtu()
Simon reported that ndo_change_mtu() methods were never
updated to use WRITE_ONCE(dev->mtu, new_mtu) as hinted
in commit 501a90c945 ("inet: protect against too small
mtu values.")

We read dev->mtu without holding RTNL in many places,
with READ_ONCE() annotations.

It is time to take care of ndo_change_mtu() methods
to use corresponding WRITE_ONCE()

Signed-off-by: Eric Dumazet <edumazet@google.com>
Reported-by: Simon Horman <horms@kernel.org>
Closes: https://lore.kernel.org/netdev/20240505144608.GB67882@kernel.org/
Reviewed-by: Jacob Keller <jacob.e.keller@intel.com>
Reviewed-by: Sabrina Dubroca <sd@queasysnail.net>
Reviewed-by: Simon Horman <horms@kernel.org>
Acked-by: Shannon Nelson <shannon.nelson@amd.com>
Link: https://lore.kernel.org/r/20240506102812.3025432-1-edumazet@google.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2024-05-07 16:19:14 -07:00
..
falcon net: annotate writes on dev->mtu from ndo_change_mtu() 2024-05-07 16:19:14 -07:00
siena net: annotate writes on dev->mtu from ndo_change_mtu() 2024-05-07 16:19:14 -07:00
bitfield.h sfc: offload left-hand side rules for conntrack 2023-08-09 11:14:38 +01:00
ef10.c sfc: Implement ndo_hwtstamp_(get|set) 2023-12-05 07:45:43 -08:00
ef10_regs.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500 2019-06-19 17:09:55 +02:00
ef10_sriov.c sfc: move table locking into filter_table_{probe,remove} methods 2022-07-29 21:22:06 -07:00
ef10_sriov.h sfc: Remove some NIC type indirections that are no longer needed 2023-07-28 09:54:17 +01:00
ef100.c sfc_ef100: Drop redundant pci_disable_pcie_error_reporting() 2023-03-08 23:34:39 -08:00
ef100.h sfc: skeleton EF100 PF driver 2020-07-27 12:26:55 -07:00
ef100_ethtool.c net: ethtool: get rid of get/set_rxfh_context functions 2023-12-13 22:07:16 -08:00
ef100_ethtool.h sfc: skeleton EF100 PF driver 2020-07-27 12:26:55 -07:00
ef100_netdev.c sfc: neighbour lookup for TC encap action offload 2023-06-10 00:11:49 -07:00
ef100_netdev.h sfc: hook up ef100 representor TX 2022-07-22 12:50:06 +01:00
ef100_nic.c Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2023-08-18 12:44:56 -07:00
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 sfc: update EF100 register descriptions 2022-07-22 12:50:06 +01:00
ef100_rep.c sfc: add support for devlink port_function_hw_addr_get in ef100 2023-02-16 12:03:13 +01: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 sfc: check hash is valid before using it 2020-08-14 14:07:16 -07:00
ef100_sriov.c sfc: add skeleton ef100 VF representors 2022-07-22 12:50:06 +01:00
ef100_sriov.h sfc: add skeleton ef100 VF representors 2022-07-22 12:50:06 +01:00
ef100_tx.c sfc: Remove struct efx_special_buffer 2023-07-28 09:54:17 +01:00
ef100_tx.h sfc: use budget for TX completions 2023-06-17 00:06:55 -07:00
efx.c sfc: Implement ndo_hwtstamp_(get|set) 2023-12-05 07:45:43 -08:00
efx.h sfc: Remove support for siena high priority queue 2023-07-28 09:54:17 +01:00
efx_channels.c net: Tree wide: Replace xdp_do_flush_map() with xdp_do_flush(). 2023-10-03 07:34:51 -07:00
efx_channels.h Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2022-05-12 16:15:30 -07:00
efx_common.c net: annotate writes on dev->mtu from ndo_change_mtu() 2024-05-07 16:19:14 -07:00
efx_common.h sfc: attach/detach EF100 representors along with their owning PF 2022-07-22 12:50:06 +01:00
efx_devlink.c sfc: support for devlink port requires MAE access 2023-06-29 11:10:27 -07:00
efx_devlink.h sfc: add devlink port support for ef100 2023-02-16 12:03:12 +01:00
enum.h sfc: Remove duplicate argument 2021-04-14 13:55:07 -07:00
ethtool.c net: ethtool: get rid of get/set_rxfh_context functions 2023-12-13 22:07:16 -08:00
ethtool_common.c net: ethtool: get rid of get/set_rxfh_context functions 2023-12-13 22:07:16 -08:00
ethtool_common.h net: ethtool: get rid of get/set_rxfh_context functions 2023-12-13 22:07:16 -08:00
filter.h sfc: Miscellaneous comment removals 2023-07-28 09:54:18 +01:00
io.h - Some swap cleanups from Ma Wupeng ("fix WARN_ON in add_to_avail_list") 2023-08-29 14:25:26 -07:00
Kconfig sfc: add CONFIG_INET dependency for TC offload 2023-06-20 20:37:16 -07:00
mae.c sfc: support offloading ct(nat) action in RHS rules 2023-10-15 14:25:03 +01:00
mae.h sfc: introduce ethernet pedit set action infrastructure 2023-08-27 06:56:54 +01:00
mae_counter_format.h sfc: add extra RX channel to receive MAE counter updates on ef100 2022-11-16 09:07:02 +00:00
Makefile sfc: functions to register for conntrack zone offload 2023-08-09 11:14:37 +01:00
mcdi.c sfc: replace deprecated strncpy with strscpy 2023-10-13 17:24:39 -07:00
mcdi.h sfc: offload left-hand side rules for conntrack 2023-08-09 11:14:38 +01:00
mcdi_filters.c sfc: use a dynamic m-port for representor RX and set it promisc 2022-07-29 21:22:07 -07:00
mcdi_filters.h sfc: move table locking into filter_table_{probe,remove} methods 2022-07-29 21:22:06 -07:00
mcdi_functions.c sfc: Remove struct efx_special_buffer 2023-07-28 09:54:17 +01:00
mcdi_functions.h sfc: de-indirect TSO handling 2020-09-11 17:15:22 -07:00
mcdi_mon.c net: ethernet: move from strlcpy with unused retval to strscpy 2022-08-31 14:11:26 -07:00
mcdi_pcol.h sfc: update MCDI protocol headers 2022-07-19 13:37:04 -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_port.c sfc: Encapsulate access to netdev_priv() 2022-06-29 13:40:47 +01:00
mcdi_port.h sfc: move NIC-specific mcdi_port declarations out of common header 2020-06-30 13:09:09 -07:00
mcdi_port_common.c sfc: Filter cleanups for Falcon and Siena 2023-07-28 09:54:17 +01:00
mcdi_port_common.h sfc: coding style cleanups in mcdi_port_common.c 2020-09-08 20:14:33 -07:00
mtd.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500 2019-06-19 17:09:55 +02:00
net_driver.h sfc: Implement ndo_hwtstamp_(get|set) 2023-12-05 07:45:43 -08:00
nic.c sfc: Cleanups in io.h 2023-07-28 09:54:18 +01:00
nic.h sfc: Remove siena_nic_data and stats 2023-07-28 09:54:17 +01:00
nic_common.h sfc: Miscellaneous comment removals 2023-07-28 09:54:18 +01:00
ptp.c sfc: Implement ndo_hwtstamp_(get|set) 2023-12-05 07:45:43 -08:00
ptp.h sfc: Implement ndo_hwtstamp_(get|set) 2023-12-05 07:45:43 -08:00
rx.c sfc: check for zero length in EF10 RX prefix 2023-09-01 08:14:57 +01:00
rx_common.c net: introduce include/net/rps.h 2024-03-07 21:12:43 -08:00
rx_common.h sfc: The size of the RX recycle ring should be more flexible 2022-02-01 20:34:59 -08:00
selftest.c Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2023-08-24 10:51:39 -07:00
selftest.h sfc: decouple TXQ type from label 2020-09-11 17:15:22 -07:00
sriov.c sfc: Encapsulate access to netdev_priv() 2022-06-29 13:40:47 +01:00
sriov.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500 2019-06-19 17:09:55 +02:00
tc.c sfc: use flow_rule_is_supp_control_flags() 2024-04-18 17:04:19 -07:00
tc.h sfc: support offloading ct(nat) action in RHS rules 2023-10-15 14:25:03 +01:00
tc_bindings.c sfc: neighbour lookup for TC encap action offload 2023-06-10 00:11:49 -07:00
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 sfc: parse mangle actions (NAT) in conntrack entries 2023-10-15 14:25:03 +01:00
tc_conntrack.h sfc: handle non-zero chain_index on TC rules 2023-08-09 11:14:38 +01:00
tc_counters.c sfc: handle error pointers returned by rhashtable_lookup_get_insert_fast() 2023-09-21 10:37:16 +02:00
tc_counters.h sfc: offload conntrack flow entries (match only) from CT zones 2023-08-09 11:14:38 +01:00
tc_encap_actions.c sfc: handle error pointers returned by rhashtable_lookup_get_insert_fast() 2023-09-21 10:37:16 +02:00
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
tx.c sfc: Remove support for siena high priority queue 2023-07-28 09:54:17 +01:00
tx.h sfc: select inner-csum-offload TX queues for skbs that need it 2020-09-11 17:15:22 -07:00
tx_common.c net: adopt skb_network_offset() and similar helpers 2024-03-04 08:47:06 +00:00
tx_common.h sfc: use budget for TX completions 2023-06-17 00:06:55 -07:00
tx_tso.c net: adopt skb_network_offset() and similar helpers 2024-03-04 08:47:06 +00:00
workarounds.h sfc: Remove EFX_REV_SIENA_A0 2023-07-28 09:54:17 +01:00