mirror of
https://github.com/projectacrn/acrn-hypervisor.git
synced 2025-06-20 04:33:55 +00:00
dm: NULL check of vq->used in virtio_net_ping_rxq
Add a check on this place to avoid NULL access issue. Tracked-On: #6100 Signed-off-by: Jie Deng <jie.deng@intel.com>
This commit is contained in:
parent
21915dfd52
commit
81c5bdab5f
@ -490,7 +490,9 @@ virtio_net_ping_rxq(void *vdev, struct virtio_vq_info *vq)
|
|||||||
*/
|
*/
|
||||||
if (net->rx_ready == 0) {
|
if (net->rx_ready == 0) {
|
||||||
net->rx_ready = 1;
|
net->rx_ready = 1;
|
||||||
vq->used->flags |= VRING_USED_F_NO_NOTIFY;
|
if (vq->used != NULL) {
|
||||||
|
vq->used->flags |= VRING_USED_F_NO_NOTIFY;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user