diff options
author | Stefan Hajnoczi <stefanha@redhat.com> | 2022-11-11 11:44:07 -0500 |
---|---|---|
committer | Stefan Hajnoczi <stefanha@redhat.com> | 2022-11-11 11:44:07 -0500 |
commit | 67c6597ad19e07313ea4f845fcda1ad574897242 (patch) | |
tree | d8ddd9e6ee782ef41ad2147efd50628d28ea5db9 /hw | |
parent | 2ccad61746ca7de5dd3e25146062264387e43bd4 (diff) | |
parent | f47af0af0db5933664c621b8af8067ebbcbe66cd (diff) | |
download | qemu-67c6597ad19e07313ea4f845fcda1ad574897242.zip qemu-67c6597ad19e07313ea4f845fcda1ad574897242.tar.gz qemu-67c6597ad19e07313ea4f845fcda1ad574897242.tar.bz2 |
Merge tag 'for_upstream' of https://git.kernel.org/pub/scm/virt/kvm/mst/qemu into staging
pc,virtio: regression fixes
fixes issues from the last pull request:
unresolved symbols for taargets without acpi
typo in a comment in checkpatch
virtio buffer overflow
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
# -----BEGIN PGP SIGNATURE-----
#
# iQFDBAABCAAtFiEEXQn9CHHI+FuUyooNKB8NuNKNVGkFAmNtZ0gPHG1zdEByZWRo
# YXQuY29tAAoJECgfDbjSjVRpc/oIAIYNoZZGbAd9kvePlwO9mDiw8mMILNo2ylnh
# RXNUggqmNy/A4Tiu9WFFUwHlT7CWUQAz6gYTyC3eyr7rz87GhjF16EQ+hMOi9wVr
# MlgbYyvp+/MBQDdJGbJJVXxL1/wmC4LAQws8S3AVY++dvEegxod7uC2vF8abHUP+
# vvihz+SHqhDFL5TSLITNOWQfIp4KIaNIx2ZugHI7mYKUHS7YwW38QC3dScTQlsV/
# /qr1YhJ9mGFWBq+dFytBwcQjA+NSKN2wQJtEQadGO7cTzcrBenLewoN1VOKcv2+s
# jTNAt7Q973HVAQMYWuQB5272S3Xar1ArpUPxm6IwEbYB5Q9OJCg=
# =me5Q
# -----END PGP SIGNATURE-----
# gpg: Signature made Thu 10 Nov 2022 16:04:08 EST
# gpg: using RSA key 5D09FD0871C8F85B94CA8A0D281F0DB8D28D5469
# gpg: issuer "mst@redhat.com"
# gpg: Good signature from "Michael S. Tsirkin <mst@kernel.org>" [full]
# gpg: aka "Michael S. Tsirkin <mst@redhat.com>" [full]
# Primary key fingerprint: 0270 606B 6F3C DF3D 0B17 0970 C350 3912 AFBE 8E67
# Subkey fingerprint: 5D09 FD08 71C8 F85B 94CA 8A0D 281F 0DB8 D28D 5469
* tag 'for_upstream' of https://git.kernel.org/pub/scm/virt/kvm/mst/qemu:
virtio-net: fix for heap-buffer-overflow
display: include dependencies explicitly
checkpatch: typo fix
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Diffstat (limited to 'hw')
-rw-r--r-- | hw/display/ati_2d.c | 1 | ||||
-rw-r--r-- | hw/display/cirrus_vga.c | 1 | ||||
-rw-r--r-- | hw/display/cirrus_vga_isa.c | 1 | ||||
-rw-r--r-- | hw/display/vga-isa.c | 1 | ||||
-rw-r--r-- | hw/display/vga-mmio.c | 1 | ||||
-rw-r--r-- | hw/display/vga-pci.c | 1 | ||||
-rw-r--r-- | hw/display/vga.c | 1 | ||||
-rw-r--r-- | hw/display/vga_int.h | 1 | ||||
-rw-r--r-- | hw/display/vmware_vga.c | 1 | ||||
-rw-r--r-- | hw/net/virtio-net.c | 18 |
10 files changed, 24 insertions, 3 deletions
diff --git a/hw/display/ati_2d.c b/hw/display/ati_2d.c index 692bec9..7d78665 100644 --- a/hw/display/ati_2d.c +++ b/hw/display/ati_2d.c @@ -12,6 +12,7 @@ #include "ati_regs.h" #include "qemu/log.h" #include "ui/pixel_ops.h" +#include "ui/console.h" /* * NOTE: diff --git a/hw/display/cirrus_vga.c b/hw/display/cirrus_vga.c index c1e719a..6e8c747 100644 --- a/hw/display/cirrus_vga.c +++ b/hw/display/cirrus_vga.c @@ -45,6 +45,7 @@ #include "ui/pixel_ops.h" #include "cirrus_vga_internal.h" #include "qom/object.h" +#include "ui/console.h" /* * TODO: diff --git a/hw/display/cirrus_vga_isa.c b/hw/display/cirrus_vga_isa.c index 96144bd..84be516 100644 --- a/hw/display/cirrus_vga_isa.c +++ b/hw/display/cirrus_vga_isa.c @@ -31,6 +31,7 @@ #include "hw/isa/isa.h" #include "cirrus_vga_internal.h" #include "qom/object.h" +#include "ui/console.h" #define TYPE_ISA_CIRRUS_VGA "isa-cirrus-vga" OBJECT_DECLARE_SIMPLE_TYPE(ISACirrusVGAState, ISA_CIRRUS_VGA) diff --git a/hw/display/vga-isa.c b/hw/display/vga-isa.c index 46abbc5..2a5437d 100644 --- a/hw/display/vga-isa.c +++ b/hw/display/vga-isa.c @@ -32,6 +32,7 @@ #include "qemu/timer.h" #include "hw/loader.h" #include "hw/qdev-properties.h" +#include "ui/console.h" #include "qom/object.h" #define TYPE_ISA_VGA "isa-vga" diff --git a/hw/display/vga-mmio.c b/hw/display/vga-mmio.c index 75dfced..cd2c467 100644 --- a/hw/display/vga-mmio.c +++ b/hw/display/vga-mmio.c @@ -27,6 +27,7 @@ #include "hw/sysbus.h" #include "hw/display/vga.h" #include "hw/qdev-properties.h" +#include "ui/console.h" #include "vga_int.h" /* diff --git a/hw/display/vga-pci.c b/hw/display/vga-pci.c index 9a91de7..df23dbf 100644 --- a/hw/display/vga-pci.c +++ b/hw/display/vga-pci.c @@ -30,6 +30,7 @@ #include "migration/vmstate.h" #include "vga_int.h" #include "ui/pixel_ops.h" +#include "ui/console.h" #include "qemu/module.h" #include "qemu/timer.h" #include "hw/loader.h" diff --git a/hw/display/vga.c b/hw/display/vga.c index 50ecb1a..0cb26a7 100644 --- a/hw/display/vga.c +++ b/hw/display/vga.c @@ -31,6 +31,7 @@ #include "vga_int.h" #include "vga_regs.h" #include "ui/pixel_ops.h" +#include "ui/console.h" #include "qemu/timer.h" #include "hw/xen/xen.h" #include "migration/vmstate.h" diff --git a/hw/display/vga_int.h b/hw/display/vga_int.h index 330406a..7cf0d11 100644 --- a/hw/display/vga_int.h +++ b/hw/display/vga_int.h @@ -27,7 +27,6 @@ #include "exec/ioport.h" #include "exec/memory.h" -#include "ui/console.h" #include "hw/display/bochs-vbe.h" #include "hw/acpi/acpi_aml_interface.h" diff --git a/hw/display/vmware_vga.c b/hw/display/vmware_vga.c index cedbbde..53949d2 100644 --- a/hw/display/vmware_vga.c +++ b/hw/display/vmware_vga.c @@ -33,6 +33,7 @@ #include "hw/qdev-properties.h" #include "migration/vmstate.h" #include "qom/object.h" +#include "ui/console.h" #undef VERBOSE #define HW_RECT_ACCEL diff --git a/hw/net/virtio-net.c b/hw/net/virtio-net.c index 8b32339..aba1275 100644 --- a/hw/net/virtio-net.c +++ b/hw/net/virtio-net.c @@ -549,7 +549,14 @@ static RxFilterInfo *virtio_net_query_rxfilter(NetClientState *nc) static void virtio_net_queue_reset(VirtIODevice *vdev, uint32_t queue_index) { VirtIONet *n = VIRTIO_NET(vdev); - NetClientState *nc = qemu_get_subqueue(n->nic, vq2q(queue_index)); + NetClientState *nc; + + /* validate queue_index and skip for cvq */ + if (queue_index >= n->max_queue_pairs * 2) { + return; + } + + nc = qemu_get_subqueue(n->nic, vq2q(queue_index)); if (!nc->peer) { return; @@ -566,9 +573,16 @@ static void virtio_net_queue_reset(VirtIODevice *vdev, uint32_t queue_index) static void virtio_net_queue_enable(VirtIODevice *vdev, uint32_t queue_index) { VirtIONet *n = VIRTIO_NET(vdev); - NetClientState *nc = qemu_get_subqueue(n->nic, vq2q(queue_index)); + NetClientState *nc; int r; + /* validate queue_index and skip for cvq */ + if (queue_index >= n->max_queue_pairs * 2) { + return; + } + + nc = qemu_get_subqueue(n->nic, vq2q(queue_index)); + if (!nc->peer || !vdev->vhost_started) { return; } |