mirror of
https://github.com/projectacrn/acrn-hypervisor.git
synced 2025-06-22 13:37:10 +00:00
dm: validate inputs in vq_endchains
inputs shall be validated to avoid NULL pointer access. Tracked-On: #6129 Signed-off-by: Yonghua Huang <yonghua.huang@intel.com>
This commit is contained in:
parent
e00c4176e1
commit
eeffdb4833
@ -609,6 +609,9 @@ vq_endchains(struct virtio_vq_info *vq, int used_all_avail)
|
|||||||
uint16_t event_idx, new_idx, old_idx;
|
uint16_t event_idx, new_idx, old_idx;
|
||||||
int intr;
|
int intr;
|
||||||
|
|
||||||
|
if (!vq || !vq->used)
|
||||||
|
return;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Interrupt generation: if we're using EVENT_IDX,
|
* Interrupt generation: if we're using EVENT_IDX,
|
||||||
* interrupt if we've crossed the event threshold.
|
* interrupt if we've crossed the event threshold.
|
||||||
|
Loading…
Reference in New Issue
Block a user