1
0
Fork 0
mirror of synced 2025-03-06 20:59:54 +01:00
linux/drivers/net/ethernet/hisilicon/hns
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
..
hnae.c net: hns: make hnae_class constant 2024-03-05 11:21:17 -08:00
hnae.h ethernet: constify references to netdev->dev_addr in drivers 2021-10-14 09:22:11 -07:00
hns_ae_adapt.c ethernet: constify references to netdev->dev_addr in drivers 2021-10-14 09:22:11 -07:00
hns_dsaf_gmac.c net: Convert some ethtool_sprintf() to ethtool_puts() 2023-12-08 10:56:25 +00:00
hns_dsaf_gmac.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 152 2019-05-30 11:26:32 -07:00
hns_dsaf_mac.c net: hns: fix fake link up on xge port 2023-12-06 12:19:08 +01:00
hns_dsaf_mac.h net: hns: Remove unused function declaration mac_adjust_link() 2023-08-08 14:56:22 -07:00
hns_dsaf_main.c net: ethernet: hisilicon: Convert to platform remove callback returning void 2023-09-20 09:06:38 +01:00
hns_dsaf_main.h net: hns: Prefer struct_size over open coded arithmetic 2021-10-12 11:23:11 +01:00
hns_dsaf_misc.c net: hns: Switch to use acpi_evaluate_dsm_typed() 2023-01-20 13:25:17 +00:00
hns_dsaf_misc.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 152 2019-05-30 11:26:32 -07:00
hns_dsaf_ppe.c net: Explicitly include correct DT includes 2023-07-27 20:33:16 -07:00
hns_dsaf_ppe.h net: hns: Annotate struct ppe_common_cb with __counted_by 2023-10-02 11:24:52 -07:00
hns_dsaf_rcb.c net: Explicitly include correct DT includes 2023-07-27 20:33:16 -07:00
hns_dsaf_rcb.h net: hisilicon: Annotate struct rcb_common_cb with __counted_by 2023-10-02 11:24:53 -07:00
hns_dsaf_reg.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 152 2019-05-30 11:26:32 -07:00
hns_dsaf_xgmac.c net: Convert some ethtool_sprintf() to ethtool_puts() 2023-12-08 10:56:25 +00:00
hns_dsaf_xgmac.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 152 2019-05-30 11:26:32 -07:00
hns_enet.c net: annotate writes on dev->mtu from ndo_change_mtu() 2024-05-07 16:19:14 -07:00
hns_enet.h net: hns: fix wrong head when modify the tx feature when sending packets 2023-12-06 12:19:08 +01:00
hns_ethtool.c net: ethtool: pass a pointer to parameters to get/set_rxfh ethtool ops 2023-12-13 22:07:16 -08:00
Makefile