dm: fix fault Injection into VirtIO console backend

Add Null pointer check in init vq ring and add vq ring descriptor
 check in case cause Nullpointer exception.

Tracked-On: #5355
Signed-off-by: Liu Long <long.liu@intel.com>
Reviewed-by: Wang, Yu1 <yu1.wang@intel.com>
This commit is contained in:
Liu Long
2020-09-25 13:41:25 +08:00
committed by wenlingz
parent ade53aa53a
commit dec8c09d04
3 changed files with 14 additions and 1 deletions

View File

@@ -468,6 +468,7 @@ vm_map_gpa(struct vmctx *ctx, vm_paddr_t gaddr, size_t len)
}
}
pr_dbg("%s context memory is not valid!\n", __func__);
return NULL;
}