Skip to content
Commit c546ecf2 authored by Jason Wang's avatar Jason Wang
Browse files

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: 108a6481 ("vhost-vdpa: introduce vhost-vdpa backend")
Cc: Cindy Lu <lulu@redhat.com>
Tested-by: default avatarCornelia Huck <cohuck@redhat.com>
Reviewed-by: default avatarCornelia Huck <cohuck@redhat.com>
Signed-off-by: default avatarJason Wang <jasowang@redhat.com>
parent a48aaf88
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment