[PATCH net v4 2/7] um: vector: trim skbs before verifying the header
Willem de Bruijn
willemdebruijn.kernel at gmail.com
Wed Oct 21 09:08:52 PDT 2026
Michael S. Tsirkin wrote:
> The vector receive path over-allocates the skb and only trims it
> to the received length after the transport header is verified.
>
> A follow up patch will complete the packet checksum in software within
> virtio_net_hdr_to_skb so we need the packet trimmed (otherwise the
> checksum would be computed incorrectly over the unreceived tail of the
> buffer).
>
> Trim first, so the import sees the packet as it was received.
>
> Signed-off-by: Michael S. Tsirkin <mst at redhat.com>
Reviewed-by: Willem de Bruijn <willemb at google.com>
More information about the linux-um
mailing list