summaryrefslogtreecommitdiff
path: root/drivers/scsi/virtio_scsi.c
diff options
context:
space:
mode:
authorJason Wang <jasowang@redhat.com>2021-10-27 10:21:07 +0800
committerMichael S. Tsirkin <mst@redhat.com>2021-11-01 05:26:49 -0400
commitc57911ebfbfe745cb95da2bcf547c5bae000590f (patch)
tree24600d287dc71ab8da023c09dfa0311914239cb3 /drivers/scsi/virtio_scsi.c
parenta40392edf1b2c7822bc0ce68413106661a9d4232 (diff)
downloadlwn-c57911ebfbfe745cb95da2bcf547c5bae000590f.tar.gz
lwn-c57911ebfbfe745cb95da2bcf547c5bae000590f.zip
virtio-scsi: don't let virtio core to validate used buffer length
We never tries to use used length, so the patch prevents the virtio core from validating used length. Signed-off-by: Jason Wang <jasowang@redhat.com> Link: https://lore.kernel.org/r/20211027022107.14357-5-jasowang@redhat.com Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Diffstat (limited to 'drivers/scsi/virtio_scsi.c')
-rw-r--r--drivers/scsi/virtio_scsi.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/scsi/virtio_scsi.c b/drivers/scsi/virtio_scsi.c
index 07d0250f17c3..03b09ecea42d 100644
--- a/drivers/scsi/virtio_scsi.c
+++ b/drivers/scsi/virtio_scsi.c
@@ -977,6 +977,7 @@ static unsigned int features[] = {
static struct virtio_driver virtio_scsi_driver = {
.feature_table = features,
.feature_table_size = ARRAY_SIZE(features),
+ .suppress_used_validation = true,
.driver.name = KBUILD_MODNAME,
.driver.owner = THIS_MODULE,
.id_table = id_table,