aboutsummaryrefslogtreecommitdiff
path: root/hw/net/xen_nic.c
diff options
context:
space:
mode:
authorJason Wang <jasowang@redhat.com>2020-07-25 08:13:17 +0800
committerJason Wang <jasowang@redhat.com>2020-07-28 16:57:58 +0800
commitc546ecf27da1114d0274abe600cc6bde6584e659 (patch)
tree874f6c5c665a390968ea986138c7536256b9f079 /hw/net/xen_nic.c
parenta48aaf882b100b30111b5c7c75e1d9e83fe76cfd (diff)
downloadqemu-c546ecf27da1114d0274abe600cc6bde6584e659.zip
qemu-c546ecf27da1114d0274abe600cc6bde6584e659.tar.gz
qemu-c546ecf27da1114d0274abe600cc6bde6584e659.tar.bz2
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>
Diffstat (limited to 'hw/net/xen_nic.c')
0 files changed, 0 insertions, 0 deletions