[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <e24f9c99-f800-44ed-86a9-8a48739586ab@intel.com>
Date: Wed, 15 Oct 2025 14:04:14 +0200
From: Alexander Lobakin <aleksander.lobakin@...el.com>
To: Eric Dumazet <edumazet@...gle.com>
CC: "David S . Miller" <davem@...emloft.net>, Jakub Kicinski
<kuba@...nel.org>, Paolo Abeni <pabeni@...hat.com>, Simon Horman
<horms@...nel.org>, Willem de Bruijn <willemb@...gle.com>,
<netdev@...r.kernel.org>, <eric.dumazet@...il.com>
Subject: Re: [PATCH net] net: gro: clear skb_shinfo(skb)->hwtstamps in
napi_reuse_skb()
From: Eric Dumazet <edumazet@...gle.com>
Date: Wed, 15 Oct 2025 06:32:21 +0000
> Some network drivers assume this field is zero after napi_get_frags().
>
> We must clear it in napi_reuse_skb() otherwise the following can happen:
>
> 1) A packet is received, and skb_shinfo(skb)->hwtstamps is populated
> because a bit in the receive descriptor announced hwtstamp
> availability for this packet.
>
> 2) Packet is given to gro layer via napi_gro_frags().
>
> 3) Packet is merged to a prior one held in GRO queues.
>
> 4) skb is saved after some cleanup in napi->skb via a call
> to napi_reuse_skb().
>
> 5) Next packet is received 10 seconds later, gets the recycled skb
> from napi_get_frags().
>
> 6) The receive descriptor does not announce hwtstamp availability.
> Driver does not clear shinfo->hwtstamps.
>
> 7) We have in shinfo->hwtstamps an old timestamp.
>
> Fixes: ac45f602ee3d ("net: infrastructure for hardware time stamping")
> Signed-off-by: Eric Dumazet <edumazet@...gle.com>
Reviewed-by: Alexander Lobakin <aleksander.lobakin@...el.com>
Thanks,
Olek
Powered by blists - more mailing lists