forked from ~ljy/RK356X_SDK_RELEASE

hc
2024-10-22 8ac6c7a54ed1b98d142dce24b11c6de6a1e239a5
kernel/tools/virtio/vringh_test.c
....@@ -307,6 +307,8 @@
307307 close(to_host[0]);
308308
309309 gvdev.vdev.features = features;
310
+ INIT_LIST_HEAD(&gvdev.vdev.vqs);
311
+ spin_lock_init(&gvdev.vdev.vqs_list_lock);
310312 gvdev.to_host_fd = to_host[1];
311313 gvdev.notifies = 0;
312314
....@@ -453,6 +455,8 @@
453455
454456 getrange = getrange_iov;
455457 vdev.features = 0;
458
+ INIT_LIST_HEAD(&vdev.vqs);
459
+ spin_lock_init(&vdev.vqs_list_lock);
456460
457461 while (argv[1]) {
458462 if (strcmp(argv[1], "--indirect") == 0)