forked from qemu/qemu
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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: 108a648 ("vhost-vdpa: introduce vhost-vdpa backend") Cc: Cindy Lu <[email protected]> Tested-by: Cornelia Huck <[email protected]> Reviewed-by: Cornelia Huck <[email protected]> Signed-off-by: Jason Wang <[email protected]>
- Loading branch information
Showing
1 changed file
with
19 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters