aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/virtio_net.c
diff options
context:
space:
mode:
authorJason Wang <jasowang@redhat.com>2021-10-27 10:21:05 +0800
committerMichael S. Tsirkin <mst@redhat.com>2021-11-01 05:26:48 -0400
commit816625c13652cef5b2c49082d652875da6f2ad7a (patch)
tree3da598330426e44ebbb56b81de400050f148303a /drivers/net/virtio_net.c
parentvirtio_ring: validate used buffer length (diff)
downloadlinux-dev-816625c13652cef5b2c49082d652875da6f2ad7a.tar.xz
linux-dev-816625c13652cef5b2c49082d652875da6f2ad7a.zip
virtio-net: don't let virtio core to validate used length
For RX virtuqueue, the used length is validated in all the three paths (big, small and mergeable). For control vq, we never tries to use used length. So this patch forbids the core to validate the used length. Signed-off-by: Jason Wang <jasowang@redhat.com> Link: https://lore.kernel.org/r/20211027022107.14357-3-jasowang@redhat.com Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Diffstat (limited to 'drivers/net/virtio_net.c')
-rw-r--r--drivers/net/virtio_net.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/net/virtio_net.c b/drivers/net/virtio_net.c
index 6d8c8745bf24..7c43bfc1ce44 100644
--- a/drivers/net/virtio_net.c
+++ b/drivers/net/virtio_net.c
@@ -3385,6 +3385,7 @@ static struct virtio_driver virtio_net_driver = {
.feature_table_size = ARRAY_SIZE(features),
.feature_table_legacy = features_legacy,
.feature_table_size_legacy = ARRAY_SIZE(features_legacy),
+ .suppress_used_validation = true,
.driver.name = KBUILD_MODNAME,
.driver.owner = THIS_MODULE,
.id_table = id_table,