> When an XDP program leaves less than ETH_HLEN in the linear part of a > multi-buffer packet, mlx5e_skb_from_cqe_mpwrq_nonlinear() pulls the rest > of the Ethernet header in from the frags with __pskb_pull_tail() and > ignores the return value. If that pull fails, eth_type_trans() later > finds less than ETH_HLEN in the head and BUG()s in __skb_pull(). > > Use pskb_may_pull() instead and drop the packet if it fails. Pulling > min(ETH_HLEN, skb->len) keeps today's behaviour for a frame shorter > than an Ethernet header. > > Assisted-by: LLM > Signed-off-by: Josef Bacik <[email protected]>
Sashiko has reviewed this patch and found no issues. It looks great! -- Sashiko AI review ยท https://sashiko.dev/#/patchset/20261007-b4-pskb-pull-tail-drivers-v1-0-9512b0fb9...@toxicpanda.com?part=2
