---
 Documentation/lguest/lguest.c |    6 ++++++
 1 file changed, 6 insertions(+)

diff -r 31297eb1a0ee Documentation/lguest/lguest.c
--- a/Documentation/lguest/lguest.c	Thu May 08 21:37:16 2008 +1000
+++ b/Documentation/lguest/lguest.c	Thu May 08 21:44:01 2008 +1000
@@ -57,6 +57,8 @@ typedef uint16_t u16;
 typedef uint16_t u16;
 typedef uint8_t u8;
 /*:*/
+
+static struct vring *watch;
 
 #define PAGE_PRESENT 0x7 	/* Present, RW, Execute */
 #define NET_PEERNUM 1
@@ -299,6 +301,7 @@ static void *map_zeroed_pages(unsigned i
 		err(1, "Mmaping %u pages of /dev/zero", num);
 
 	verbose("Memory backing file is %s @ %p\n", memfile_path, addr);
+	memset(addr, 0, getpagesize() * num);
 	return addr;
 }
 
@@ -1162,6 +1165,7 @@ static void add_virtqueue(struct device 
 
 	/* Initialize the vring. */
 	vring_init(&vq->vring, num_descs, p, getpagesize());
+	memset(p, 0, vring_size(num_descs, getpagesize()));
 
 	/* Append virtqueue to this device's descriptor.  We use
 	 * device_config() to get the end of the device's current virtqueues;
@@ -1490,6 +1494,8 @@ static void setup_tun_net(const char *ar
 		/* Now we create the receive and xmit ringfds. */
 		ni->recvfd = map_vring(&dev->vq->vring);
 		ni->xmitfd = map_vring(&dev->vq->next->vring);
+
+		watch = &dev->vq->vring;
 
 		/* Tell the tunnet to use them. */
 		if (ioctl(netfd, TUNSETRECVVRING, ni->recvfd) != 0)
