git: 526ddf174ee9 - main - vtnet: Mark MRG_RXBUF headers as initialized before loading fields
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Thu, 20 Jan 2022 14:58:43 UTC
The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=526ddf174ee9eade8902800cf3d546c7ddc35979 commit 526ddf174ee9eade8902800cf3d546c7ddc35979 Author: Mark Johnston <markj@FreeBSD.org> AuthorDate: 2022-01-20 13:25:14 +0000 Commit: Mark Johnston <markj@FreeBSD.org> CommitDate: 2022-01-20 13:25:14 +0000 vtnet: Mark MRG_RXBUF headers as initialized before loading fields MFC after: 1 week Sponsored by: The FreeBSD Foundation --- sys/dev/virtio/network/if_vtnet.c | 1 + 1 file changed, 1 insertion(+) 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)) {