diff --git a/drivers/net/virtio_net.c b/drivers/net/virtio_net.c index 5ca97713bfb33b5d5a7770f3ae6a2000a19df423..9bc107200709fdf501ad473017ef335aff996c18 100644 --- a/drivers/net/virtio_net.c +++ b/drivers/net/virtio_net.c @@ -1713,6 +1713,12 @@ static int virtnet_probe(struct virtio_device *vdev) struct virtnet_info *vi; u16 max_queue_pairs; + if (!vdev->config->get) { + dev_err(&vdev->dev, "%s failure: config access disabled\n", + __func__); + return -EINVAL; + } + if (!virtnet_validate_features(vdev)) return -EINVAL;