Re: [PATCH v3 net] vlan: fix skb_under_panic and races when toggling HW VLAN offload
| Newsgroups | org.kernel.vger.netdev,org.kernel.vger.stable |
|---|---|
| Message-ID | <178725782988.470503.15788449935898012814.git-patchwork-notify@kernel.org> |
Hello: This patch was applied to netdev/net.git (main) by Jakub Kicinski <[email protected]>: On Tue, 11 Aug 2026 08:52:46 +0000 you wrote: > Toggling hardware VLAN TX offload (NETIF_F_HW_VLAN_CTAG_TX or > NETIF_F_HW_VLAN_STAG_TX) on a lower device invokes vlan_transfer_features(), > which dynamically changed vlandev->hard_header_len. > > This causes two issues: > 1. Lockless TX paths (e.g. packet_snd in af_packet.c, ip6_finish_output2) > read dev->hard_header_len without holding RTNL lock. Mutating > hard_header_len dynamically under RTNL creates a data race where upper > layers reserve insufficient headroom based on a stale hard_header_len, > resulting in skb_under_panic when vlan_dev_hard_header() is called. > 2. In addition, vlan_transfer_features() updated hard_header_len without > updating header_ops, causing a mismatch between allocated headroom > and header creation. > > [...] Here is the summary with links: - [v3,net] vlan: fix skb_under_panic and races when toggling HW VLAN offload https://git.kernel.org/netdev/net/c/447cbe95ebb9 You are awesome, thank you! -- Deet-doot-dot, I am a bot. https://korg.docs.kernel.org/patchwork/pwbot.html