mirror of
https://github.com/torvalds/linux.git
synced 2026-07-26 17:20:32 +02:00
When vhost owns the virtio-net header, i.e. when VHOST_NET_F_VIRTIO_NET_HDR is negotiated, sock_hlen is 0, meaning that no header will be forwarded to the TAP device. In the current vhost_net_build_xdp() implementation, when sock_hlen == 0, the gso pointer can point at the start of the Ethernet frame instead of a virtio-net header. This results in a wrong interpretation of the destination MAC address bytes as struct virtio_net_hdr fields. This can, for some MAC addresses, trigger -EINVAL and return early before the TX descriptor is completed, which can stall vhost-net TX. Before |
||
|---|---|---|
| .. | ||
| iotlb.c | ||
| Kconfig | ||
| Makefile | ||
| net.c | ||
| scsi.c | ||
| test.c | ||
| test.h | ||
| vdpa.c | ||
| vhost.c | ||
| vhost.h | ||
| vringh.c | ||
| vsock.c | ||