> qlcnic_xmit_frame() pulls the frags that don't fit in a TX descriptor
> into the head with __pskb_pull_tail().  It already checks the result.
> Switch to pskb_may_pull(), which takes the length the head should end up
> with and checks it against the skb, so this driver no longer calls
> __pskb_pull_tail() directly.
> 
> __pskb_pull_tail() also releases empty frags, even when there's nothing
> to pull, so if the frags being pulled are all empty it still gets the
> frag count under the limit.  pskb_may_pull() returns early in that case,
> so follow it with skb_drop_empty_frags().
> 
> 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/20261008-b4-pskb-pull-tail-drivers-v2-0-8f2bd9bee...@toxicpanda.com?part=9

Reply via email to