mirror_ubuntu-kernels/drivers/net/ethernet/broadcom/bnx2x
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
..
bnx2x_cmn.c net: annotate writes on dev->mtu from ndo_change_mtu() 2024-05-07 16:19:14 -07:00
bnx2x_cmn.h net/bnx2x: Prevent access to a freed page in page_pool 2024-03-19 19:34:27 -07:00
bnx2x_dcb.c
bnx2x_dcb.h
bnx2x_dump.h
bnx2x_ethtool.c bnx2x: convert EEE handling to use linkmode bitmaps 2024-02-09 12:55:19 -08:00
bnx2x_fw_defs.h
bnx2x_fw_file_hdr.h
bnx2x_hsi.h
bnx2x_init_ops.h
bnx2x_init.h
bnx2x_link.c bnx2x: Fix firmware version string character counts 2024-01-26 21:01:30 -08:00
bnx2x_link.h
bnx2x_main.c cnic,bnx2,bnx2x: use UIO_MEM_DMA_COHERENT 2024-03-07 21:52:59 +00:00
bnx2x_mfw_req.h
bnx2x_reg.h bnx2x: Fix spelling mistake "regiser" -> "register" 2022-04-11 10:52:09 +01:00
bnx2x_self_test.c
bnx2x_sp.c bnx2x: Remove unnecessary ternary operators 2023-08-02 12:09:13 -07:00
bnx2x_sp.h
bnx2x_sriov.c bnx2x: fix pci device refcount leak in bnx2x_vf_is_pcie_pending() 2022-11-22 13:32:26 +01:00
bnx2x_sriov.h net: ethernet: move from strlcpy with unused retval to strscpy 2022-08-31 14:11:26 -07:00
bnx2x_stats.c
bnx2x_stats.h
bnx2x_vfpf.c bnx2x: new flag for track HW resource allocation 2023-08-22 17:07:40 -07:00
bnx2x_vfpf.h
bnx2x.h bnx2x: new flag for track HW resource allocation 2023-08-22 17:07:40 -07:00
Makefile