Jason Wang c546ecf27d 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>
2020-07-28 16:57:58 +08:00
..
2019-06-12 13:20:21 +02:00
2020-07-15 21:00:13 +08:00
2019-08-16 13:31:53 +02:00
2019-08-16 13:31:52 +02:00
2020-07-21 21:30:39 +08:00
2020-07-21 21:30:39 +08:00
2019-08-16 13:31:53 +02:00
2020-01-07 17:24:29 +04:00
2020-06-18 21:05:51 +08:00
2019-06-12 13:20:21 +02:00
2019-08-16 13:31:52 +02:00