mirror of
https://github.com/projectacrn/acrn-hypervisor.git
synced 2025-06-23 14:07:42 +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
1a6ead9af5
commit
c08ceb25c5
@ -490,8 +490,10 @@ 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;
|
||||||
|
if (vq->used != NULL) {
|
||||||
vq->used->flags |= VRING_USED_F_NO_NOTIFY;
|
vq->used->flags |= VRING_USED_F_NO_NOTIFY;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
Loading…
Reference in New Issue
Block a user