Re: [PATCH net] net/packet: clear RX owner on VNET header error

From: Willem de Bruijn

Date: Sun Sep 13 2026 - 18:40:47 EST


Mark Amirkan via B4 Relay wrote:
> From: Mark Amirkan <markdamirkan@xxxxxxxxx>
>
> Commit 61fad6816fc1 ("net/packet: tpacket_rcv: avoid a producer race
> condition") added rx_owner_map and made tpacket_rcv() claim a V1 or V2
> ring slot before converting the virtio-net header. If the conversion
> fails, the drop path leaves the slot claimed.
>
> With a one-frame TPACKET_V2 ring, an unsupported UDP GSO packet leaves
> the only slot unavailable, so the ring also drops the next valid packet.
>
> Clear the ownership bit on this error path. TPACKET_V3 already clears
> its block state here.
>
> Fixes: 61fad6816fc1 ("net/packet: tpacket_rcv: avoid a producer race condition")
> Cc: stable@xxxxxxxxxxxxxxx
> Assisted-by: Symbolic
> Signed-off-by: Mark Amirkan <markdamirkan@xxxxxxxxx>

Reviewed-by: Willem de Bruijn <willemb@xxxxxxxxxx>