]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
net: ethernet: ti: am65-cpsw-nuss: Fix skb size by accounting for skb_shared_info
authorChintan Vankar <c-vankar@ti.com>
Mon, 7 Jul 2025 08:52:01 +0000 (14:22 +0530)
committerJakub Kicinski <kuba@kernel.org>
Thu, 10 Jul 2025 02:21:06 +0000 (19:21 -0700)
commit02c4d6c26f1f662da8885b299c224ca6628ad232
treecf259bcf3dcc47e2f8faeb769e2c6176e0aa1ce9
parent849704b8b2115647e12436e5076b8e7a4944f21a
net: ethernet: ti: am65-cpsw-nuss: Fix skb size by accounting for skb_shared_info

While transitioning from netdev_alloc_ip_align() to build_skb(), memory
for the "skb_shared_info" member of an "skb" was not allocated. Fix this
by allocating "PAGE_SIZE" as the skb length, accounting for the packet
length, headroom and tailroom, thereby including the required memory space
for skb_shared_info.

Fixes: 8acacc40f733 ("net: ethernet: ti: am65-cpsw: Add minimal XDP support")
Reviewed-by: Siddharth Vadapalli <s-vadapalli@ti.com>
Signed-off-by: Chintan Vankar <c-vankar@ti.com>
Link: https://patch.msgid.link/20250707085201.1898818-1-c-vankar@ti.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/ethernet/ti/am65-cpsw-nuss.c