qemu-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-commits] [qemu/qemu] a48aaf: virtio-pci: fix wrong index in virtio


From: Peter Maydell
Subject: [Qemu-commits] [qemu/qemu] a48aaf: virtio-pci: fix wrong index in virtio_pci_queue_en...
Date: Tue, 28 Jul 2020 09:15:32 -0700

  Branch: refs/heads/master
  Home:   https://github.com/qemu/qemu
  Commit: a48aaf882b100b30111b5c7c75e1d9e83fe76cfd
      
https://github.com/qemu/qemu/commit/a48aaf882b100b30111b5c7c75e1d9e83fe76cfd
  Author: Yuri Benditovich <yuri.benditovich@daynix.com>
  Date:   2020-07-28 (Tue, 28 Jul 2020)

  Changed paths:
    M hw/virtio/virtio-pci.c

  Log Message:
  -----------
  virtio-pci: fix wrong index in virtio_pci_queue_enabled

We should use the index passed by the caller instead of the queue_sel
when checking the enablement of a specific virtqueue.

This is reported in https://bugzilla.redhat.com/show_bug.cgi?id=1702608

Fixes: f19bcdfedd53 ("virtio-pci: implement queue_enabled method")
Signed-off-by: Yuri Benditovich <yuri.benditovich@daynix.com>
Signed-off-by: Jason Wang <jasowang@redhat.com>


  Commit: c546ecf27da1114d0274abe600cc6bde6584e659
      
https://github.com/qemu/qemu/commit/c546ecf27da1114d0274abe600cc6bde6584e659
  Author: Jason Wang <jasowang@redhat.com>
  Date:   2020-07-28 (Tue, 28 Jul 2020)

  Changed paths:
    M hw/net/virtio-net.c

  Log Message:
  -----------
  virtio-net: check the existence of peer before accessing vDPA config

We try to check whether a peer is VDPA in order to get config from
there - with no peer, this leads to a NULL
pointer dereference. Add a check before trying to access the peer
type. No peer means not VDPA.

Fixes: 108a64818e69b ("vhost-vdpa: introduce vhost-vdpa backend")
Cc: Cindy Lu <lulu@redhat.com>
Tested-by: Cornelia Huck <cohuck@redhat.com>
Reviewed-by: Cornelia Huck <cohuck@redhat.com>
Signed-off-by: Jason Wang <jasowang@redhat.com>


  Commit: 22dc8663d9fc7baa22100544c600b6285a63c7a3
      
https://github.com/qemu/qemu/commit/22dc8663d9fc7baa22100544c600b6285a63c7a3
  Author: Jason Wang <jasowang@redhat.com>
  Date:   2020-07-28 (Tue, 28 Jul 2020)

  Changed paths:
    M net/queue.c

  Log Message:
  -----------
  net: forbid the reentrant RX

The memory API allows DMA into NIC's MMIO area. This means the NIC's
RX routine must be reentrant. Instead of auditing all the NIC, we can
simply detect the reentrancy and return early. The queue->delivering
is set and cleared by qemu_net_queue_deliver() for other queue helpers
to know whether the delivering in on going (NIC's receive is being
called). We can check it and return early in qemu_net_queue_flush() to
forbid reentrant RX.

Signed-off-by: Jason Wang <jasowang@redhat.com>


  Commit: a466dd084f51cdc9da2e99361f674f98d7218559
      
https://github.com/qemu/qemu/commit/a466dd084f51cdc9da2e99361f674f98d7218559
  Author: Peter Maydell <peter.maydell@linaro.org>
  Date:   2020-07-28 (Tue, 28 Jul 2020)

  Changed paths:
    M hw/net/virtio-net.c
    M hw/virtio/virtio-pci.c
    M net/queue.c

  Log Message:
  -----------
  Merge remote-tracking branch 'remotes/jasowang/tags/net-pull-request' into 
staging

Want to send earlier but most patches just come.

- fix vhost-vdpa issues when no peer
- fix virtio-pci queue enabling index value
- forbid reentrant RX

Changes from V1:

- drop the patch that has been merged

# gpg: Signature made Tue 28 Jul 2020 09:59:41 BST
# gpg:                using RSA key EF04965B398D6211
# gpg: Good signature from "Jason Wang (Jason Wang on RedHat) 
<jasowang@redhat.com>" [marginal]
# gpg: WARNING: This key is not certified with sufficiently trusted signatures!
# gpg:          It is not certain that the signature belongs to the owner.
# Primary key fingerprint: 215D 46F4 8246 689E C77F  3562 EF04 965B 398D 6211

* remotes/jasowang/tags/net-pull-request:
  net: forbid the reentrant RX
  virtio-net: check the existence of peer before accessing vDPA config
  virtio-pci: fix wrong index in virtio_pci_queue_enabled

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>


Compare: https://github.com/qemu/qemu/compare/1e0e0917e5df...a466dd084f51



reply via email to

[Prev in Thread] Current Thread [Next in Thread]