dm: NULL check of vq->used in virtio_net_ping_rxq
Add a check on this place to avoid NULL access issue.
@@ -490,9 +490,11 @@ virtio_net_ping_rxq(void *vdev, struct virtio_vq_info *vq)
*/
if (net->rx_ready == 0) {
net->rx_ready = 1;
+ if (vq->used != NULL) {
vq->used->flags |= VRING_USED_F_NO_NOTIFY;
}
}
+}
static void
virtio_net_proctx(struct virtio_net *net, struct virtio_vq_info *vq)
