]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
virtio_pci: fix the common cfg map size
authorXuan Zhuo <xuanzhuo@linux.alibaba.com>
Tue, 10 Oct 2023 03:11:18 +0000 (11:11 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 2 Nov 2023 08:35:23 +0000 (09:35 +0100)
commit534487cc3eb82a660704d554b9d5dd12aa1cc00a
treee52f43802ef746ebd1e059c3180c96dc9f54da12
parent86f467d3582e0300d4574aec1cf6fb1d86dfd361
virtio_pci: fix the common cfg map size

commit 061b39fdfe7fd98946e67637213bcbb10a318cca upstream.

The function vp_modern_map_capability() takes the size parameter,
which corresponds to the size of virtio_pci_common_cfg. As a result,
this indicates the size of memory area to map.

Now the size is the size of virtio_pci_common_cfg, but some feature(such
as the _F_RING_RESET) needs the virtio_pci_modern_common_cfg, so this
commit changes the size to the size of virtio_pci_modern_common_cfg.

Cc: stable@vger.kernel.org
Fixes: 0b50cece0b78 ("virtio_pci: introduce helper to get/set queue reset")
Signed-off-by: Xuan Zhuo <xuanzhuo@linux.alibaba.com>
Message-Id: <20231010031120.81272-3-xuanzhuo@linux.alibaba.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Acked-by: Jason Wang <jasowang@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/virtio/virtio_pci_modern_dev.c