Page MenuHomeFreeBSD

D34372.diff
No OneTemporary

D34372.diff

diff --git a/usr.sbin/bhyve/pci_nvme.c b/usr.sbin/bhyve/pci_nvme.c
--- a/usr.sbin/bhyve/pci_nvme.c
+++ b/usr.sbin/bhyve/pci_nvme.c
@@ -485,7 +485,7 @@
} else {
struct nvme_submission_queue *sq = sc->submit_queues;
- for (i = 0; i < sc->num_squeues; i++)
+ for (i = 0; i < sc->num_squeues + 1; i++)
pthread_mutex_init(&sq[i].mtx, NULL);
}
@@ -508,7 +508,7 @@
} else {
struct nvme_completion_queue *cq = sc->compl_queues;
- for (i = 0; i < sc->num_cqueues; i++)
+ for (i = 0; i < sc->num_cqueues + 1; i++)
pthread_mutex_init(&cq[i].mtx, NULL);
}
}
diff --git a/usr.sbin/bhyve/pci_virtio_console.c b/usr.sbin/bhyve/pci_virtio_console.c
--- a/usr.sbin/bhyve/pci_virtio_console.c
+++ b/usr.sbin/bhyve/pci_virtio_console.c
@@ -698,6 +698,8 @@
sc->vsc_config->cols = 80;
sc->vsc_config->rows = 25;
+ pthread_mutex_init(&sc->vsc_mtx, NULL);
+
vi_softc_linkup(&sc->vsc_vs, &vtcon_vi_consts, sc, pi, sc->vsc_queues);
sc->vsc_vs.vs_mtx = &sc->vsc_mtx;
diff --git a/usr.sbin/bhyve/pci_virtio_rnd.c b/usr.sbin/bhyve/pci_virtio_rnd.c
--- a/usr.sbin/bhyve/pci_virtio_rnd.c
+++ b/usr.sbin/bhyve/pci_virtio_rnd.c
@@ -179,6 +179,8 @@
sc = calloc(1, sizeof(struct pci_vtrnd_softc));
+ pthread_mutex_init(&sc->vrsc_mtx, NULL);
+
vi_softc_linkup(&sc->vrsc_vs, &vtrnd_vi_consts, sc, pi, &sc->vrsc_vq);
sc->vrsc_vs.vs_mtx = &sc->vrsc_mtx;
diff --git a/usr.sbin/bhyve/pci_virtio_scsi.c b/usr.sbin/bhyve/pci_virtio_scsi.c
--- a/usr.sbin/bhyve/pci_virtio_scsi.c
+++ b/usr.sbin/bhyve/pci_virtio_scsi.c
@@ -700,6 +700,8 @@
return (1);
}
+ pthread_mutex_init(&sc->vss_mtx, NULL);
+
vi_softc_linkup(&sc->vss_vs, &vtscsi_vi_consts, sc, pi, sc->vss_vq);
sc->vss_vs.vs_mtx = &sc->vss_mtx;

File Metadata

Mime Type
text/plain
Expires
Wed, Nov 20, 2:16 AM (1 h, 3 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
14726280
Default Alt Text
D34372.diff (1 KB)

Event Timeline