net: dsa: tag_brcm: legacy: fix pskb_may_pull length
PATCH 1/1 net: dsa: tag_brcm: legacy: fix pskb_may_pull length
BRCM_LEG_PORT_ID was incorrectly used for pskb_may_pull length. The correct check is BRCM_LEG_TAG_LEN + VLAN_HLEN, or 10 bytes.
Fixes 964dbf186eaa ("net: dsa: tag_brcm: add support for legacy tags")
Signed-off-by Álvaro Fernández Rojas <[email protected]>
--- net/dsa/tag_brcm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
net/dsa/tag_brcm.c +1 -1
@@ -257,7 +257,7 @@ static struct sk_buff *brcm_leg_tag_rcv(struct sk_buff *skb,int source_port;u8 *brcm_tag; -if (unlikely (!pskb_may_pull (skb,BRCM_LEG_PORT_ID ))) +if (unlikely (!pskb_may_pull (skb,BRCM_LEG_TAG_LEN +VLAN_HLEN )))return NULL ; brcm_tag =dsa_etype_header_pos_rx (skb);
Signature · 1 line
2.39.5
Quoted 5 lines · Álvaro Fernández Rojas
BRCM_LEG_PORT_IDwas incorrectly used forpskb_may_pulllength. The correct check isBRCM_LEG_TAG_LEN+VLAN_HLEN, or 10 bytes.Fixes 964dbf186eaa ("net: dsa: tag_brcm: add support for legacy tags")Signed-off-by Álvaro Fernández Rojas <[email protected]>
Reviewed-by Florian Fainelli <[email protected]>
Signature · 1 line
Florian
This patch was applied to netdev/net.git (main) by Jakub Kicinski <[email protected]>:
Hello:
This patch was applied to netdev/net.git (main)
by Jakub Kicinski <[email protected]>:
Quoted 8 lines · On Thu, 29 May 2025 14:44:06 +0200 you wrote:
BRCM_LEG_PORT_IDwas incorrectly used forpskb_may_pulllength. The correct check isBRCM_LEG_TAG_LEN+VLAN_HLEN, or 10 bytes.Fixes 964dbf186eaa ("net: dsa: tag_brcm: add support for legacy tags")Signed-off-by Álvaro Fernández Rojas <[email protected]>--- net/dsa/tag_brcm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
Here is the summary with links:
- net: dsa: tag_brcm: legacy: fix pskb_may_pull length
https://git.kernel.org/netdev/net/c/efdddc448485
You are awesome, thank you!
Signature · 2 lines
Deet-doot-dot, I am a bot. https://korg.docs.kernel.org/patchwork/pwbot.html