Drivers using napi_get_frags() and napi_gro_frags() cache and reuse the fragmentless head sk_buff on napi->skb whenever incoming fragments merge into an existing GRO flow. When an unreadable or page_pool-backed skb is cached and later reused for a normal readable packet (for instance across queue reconfiguration or shared NAPI instances), leaving skb->unreadable and skb->pp_recycle set on napi->skb leaks stale state onto subsequent packets, corrupting readability checks and causing skb_gro_receive() to refuse GRO merges due to mismatched pp_recycle state. Reset skb->unreadable and skb->pp_recycle in napi_reuse_skb(). This issue was found by code inspection while developing per-socket devmem RX and reproduced and verified with the accompanying net_test KUnit tests. Fixes: 6a5bcd84e886 ("page_pool: Allow drivers to hint on SKB recycling") Fixes: 65249feb6b3d ("net: add support for skbs with unreadable frags") Assisted-by: LLM Signed-off-by: Octavian Purdila --- net/core/gro.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/net/core/gro.c b/net/core/gro.c index fb730017fd3ba..c1d07bca1b4eb 100644 --- a/net/core/gro.c +++ b/net/core/gro.c @@ -697,6 +697,8 @@ static void napi_reuse_skb(struct napi_struct *napi, struct sk_buff *skb) skb->encapsulation = 0; skb->ip_summed = CHECKSUM_NONE; + skb->unreadable = 0; + skb->pp_recycle = 0; shinfo = skb_shinfo(skb); shinfo->gso_type = 0; -- 2.56.1.915.g69d5ec7298-goog