]> git.proxmox.com Git - mirror_qemu.git/commit
virtio: guard against NULL pfn
authorJason Wang <jasowang@redhat.com>
Wed, 15 Mar 2017 11:48:30 +0000 (19:48 +0800)
committerMichael S. Tsirkin <mst@redhat.com>
Wed, 15 Mar 2017 17:37:19 +0000 (19:37 +0200)
commit168e4af3c129534ee7d81edc238a9aa9ca0dd474
tree67bd6c94fe914748aa4a3fc9b32dad611fafbb07
parent72d9196f1ef588c19821d0a4fb563836fdb2a0b7
virtio: guard against NULL pfn

To avoid access stale memory region cache after reset, this patch
check the existence of virtqueue pfn for all exported virtqueue access
helpers before trying to use them.

Cc: Cornelia Huck <cornelia.huck@de.ibm.com>
Cc: Paolo Bonzini <pbonzini@redhat.com>
Reviewed-by: Cornelia Huck <cornelia.huck@de.ibm.com>
Signed-off-by: Jason Wang <jasowang@redhat.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
hw/virtio/virtio.c