From d1ae87a97a9fa88cc1d8420759dc6fb04a35f7dc Mon Sep 17 00:00:00 2001 From: wangxingxing Date: Fri, 27 Jun 2025 22:12:09 +0800 Subject: [PATCH] fs/9pfs: use virtio_read_config_bytes() to read the tag in config space Follow the virtio spec, should use size matched operation to read virtio config space. Signed-off-by: wangxingxing --- fs/v9fs/virtio_9p.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/fs/v9fs/virtio_9p.c b/fs/v9fs/virtio_9p.c index 56811739802..0db835afab5 100644 --- a/fs/v9fs/virtio_9p.c +++ b/fs/v9fs/virtio_9p.c @@ -242,8 +242,8 @@ static int virtio_9p_probe(FAR struct virtio_device *vdev) virtio_read_config_member(vdev, struct virtio_9p_config_s, tag_len, &config.tag_len); - virtio_read_config(vdev, offsetof(struct virtio_9p_config_s, tag), - &config.tag, config.tag_len); + virtio_read_config_bytes(vdev, offsetof(struct virtio_9p_config_s, tag), + &config.tag, config.tag_len); config.tag[config.tag_len] = '\0'; if (strcmp(config.tag, priv->tag)) {