Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

virtio: Don't forget to initialize the config handler

  • Loading branch information...
commit b37c52ba276a253023688bb9b6a755046af8a4bd 1 parent 73fdce5
@xl0 authored
Showing with 4 additions and 1 deletion.
  1. +1 −1  virtio/Makefile
  2. +3 −0  virtio/virtio.c
View
2  virtio/Makefile
@@ -1,6 +1,6 @@
#CFLAGS=-D_KERNEL -DDEBUG -m64 -xarch=sse2a -xmodel=kernel -g
-CFLAGS= -D_KERNEL -DDEBUG -m64 -mcmodel=kernel -mno-red-zone -ffreestanding -nodefaultlibs -Wall
+CFLAGS= -D_KERNEL -DDEBUG -m64 -mcmodel=kernel -mno-red-zone -ffreestanding -nodefaultlibs -Wall -g
LDFLAGS=-r
View
3  virtio/virtio.c
@@ -1046,6 +1046,9 @@ virtio_register_intx(struct virtio_softc *sc,
if (config_handler) {
(void) memcpy(&vhc->config_handler, config_handler,
sizeof (struct virtio_int_handler));
+ } else {
+ memset(&vhc->config_handler, 0,
+ sizeof(struct virtio_int_handler));
}
sc->sc_intr_htable = kmem_zalloc(sizeof (ddi_intr_handle_t), KM_SLEEP);
Please sign in to comment.
Something went wrong with that request. Please try again.