mirror of
https://github.com/projectacrn/acrn-hypervisor.git
synced 2025-06-25 15:02:13 +00:00
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>
This commit is contained in:
parent
abcfc1c0a0
commit
d85d66141c
@ -373,6 +373,7 @@ virtio_vq_enable(struct virtio_base *base)
|
|||||||
/* Mark queue as allocated after initialization is complete. */
|
/* Mark queue as allocated after initialization is complete. */
|
||||||
mb();
|
mb();
|
||||||
vq->flags = VQ_ALLOC;
|
vq->flags = VQ_ALLOC;
|
||||||
|
return;
|
||||||
error:
|
error:
|
||||||
vq->flags = 0;
|
vq->flags = 0;
|
||||||
pr_err("%s: vq enable failed\n", __func__);
|
pr_err("%s: vq enable failed\n", __func__);
|
||||||
|
Loading…
Reference in New Issue
Block a user