aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMark Johnston <markj@FreeBSD.org>2022-01-20 13:25:14 +0000
committerMark Johnston <markj@FreeBSD.org>2022-01-20 13:25:14 +0000
commit526ddf174ee9eade8902800cf3d546c7ddc35979 (patch)
treee43c7153b7d5150a114f50063d9ba2c3aee54c20
parent3d8562348c9cf1a6bdc32382f5f45a0534da094a (diff)
downloadsrc-526ddf174ee9eade8902800cf3d546c7ddc35979.tar.gz
src-526ddf174ee9eade8902800cf3d546c7ddc35979.zip
vtnet: Mark MRG_RXBUF headers as initialized before loading fields
MFC after: 1 week Sponsored by: The FreeBSD Foundation
-rw-r--r--sys/dev/virtio/network/if_vtnet.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/sys/dev/virtio/network/if_vtnet.c b/sys/dev/virtio/network/if_vtnet.c
index d52a1bfcdc23..7cbbe56e6c6b 100644
--- a/sys/dev/virtio/network/if_vtnet.c
+++ b/sys/dev/virtio/network/if_vtnet.c
@@ -2084,6 +2084,7 @@ vtnet_rxq_eof(struct vtnet_rxq *rxq)
if (sc->vtnet_flags & VTNET_FLAG_MRG_RXBUFS) {
struct virtio_net_hdr_mrg_rxbuf *mhdr =
mtod(m, struct virtio_net_hdr_mrg_rxbuf *);
+ kmsan_mark(mhdr, sizeof(*mhdr), KMSAN_STATE_INITED);
nbufs = vtnet_htog16(sc, mhdr->num_buffers);
adjsz = sizeof(struct virtio_net_hdr_mrg_rxbuf);
} else if (vtnet_modern(sc)) {