Module Name:    src
Committed By:   martin
Date:           Tue Jul  9 15:16:45 UTC 2019

Modified Files:
        src/sys/dev/hyperv [netbsd-8]: vmbus.c

Log Message:
Pull up following revision(s) (requested by nakayama in ticket #1286):

        sys/dev/hyperv/vmbus.c: revision 1.4

Zero clear the allocated ring buffer for vmbus_channel.
This change makes Hyper-V's vmbus devices work properly even after reboot.


To generate a diff of this commit:
cvs rdiff -u -r1.2.2.3 -r1.2.2.4 src/sys/dev/hyperv/vmbus.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/dev/hyperv/vmbus.c
diff -u src/sys/dev/hyperv/vmbus.c:1.2.2.3 src/sys/dev/hyperv/vmbus.c:1.2.2.4
--- src/sys/dev/hyperv/vmbus.c:1.2.2.3	Wed Jun 12 10:17:32 2019
+++ src/sys/dev/hyperv/vmbus.c	Tue Jul  9 15:16:45 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: vmbus.c,v 1.2.2.3 2019/06/12 10:17:32 martin Exp $	*/
+/*	$NetBSD: vmbus.c,v 1.2.2.4 2019/07/09 15:16:45 martin Exp $	*/
 /*	$OpenBSD: hyperv.c,v 1.43 2017/06/27 13:56:15 mikeb Exp $	*/
 
 /*-
@@ -35,7 +35,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: vmbus.c,v 1.2.2.3 2019/06/12 10:17:32 martin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: vmbus.c,v 1.2.2.4 2019/07/09 15:16:45 martin Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -1263,6 +1263,7 @@ vmbus_channel_ring_create(struct vmbus_c
 		    "failed to allocate channel ring\n");
 		return ENOMEM;
 	}
+	memset(ch->ch_ring, 0, ch->ch_ring_size);
 
 	memset(&ch->ch_wrd, 0, sizeof(ch->ch_wrd));
 	ch->ch_wrd.rd_ring = (struct vmbus_bufring *)ch->ch_ring;

Reply via email to