Permalink
Browse files

virtio: Don't forget to initialize the config handler

  • Loading branch information...
1 parent 73fdce5 commit b37c52ba276a253023688bb9b6a755046af8a4bd @xl0 xl0 committed Aug 20, 2011
Showing with 4 additions and 1 deletion.
  1. +1 −1 virtio/Makefile
  2. +3 −0 virtio/virtio.c
View
@@ -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
@@ -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);

0 comments on commit b37c52b

Please sign in to comment.