Module Name:    src
Committed By:   jym
Date:           Mon Apr 25 00:14:06 UTC 2011

Modified Files:
        src/sys/arch/xen/xen: xennetback_xenbus.c

Log Message:
Check that xvif(4) is not already connected before proceeding in the
XenbusStateConnected mode. Under rare occasions, the xenbus watcher
can fire multiple times, overwriting the I/O ring memory mappings with
invalid values. This will lead sooner or later to dom0 panic().

Will ask for pullup. FWIW, xbdback(4) is not affected.


To generate a diff of this commit:
cvs rdiff -u -r1.42 -r1.43 src/sys/arch/xen/xen/xennetback_xenbus.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/arch/xen/xen/xennetback_xenbus.c
diff -u src/sys/arch/xen/xen/xennetback_xenbus.c:1.42 src/sys/arch/xen/xen/xennetback_xenbus.c:1.43
--- src/sys/arch/xen/xen/xennetback_xenbus.c:1.42	Thu Apr 21 13:06:20 2011
+++ src/sys/arch/xen/xen/xennetback_xenbus.c	Mon Apr 25 00:14:06 2011
@@ -1,4 +1,4 @@
-/*      $NetBSD: xennetback_xenbus.c,v 1.42 2011/04/21 13:06:20 jym Exp $      */
+/*      $NetBSD: xennetback_xenbus.c,v 1.43 2011/04/25 00:14:06 jym Exp $      */
 
 /*
  * Copyright (c) 2006 Manuel Bouyer.
@@ -445,6 +445,8 @@
 		break;
 
 	case XenbusStateConnected:
+		if (xneti->xni_status == CONNECTED)
+			break;
 		/* read comunication informations */
 		err = xenbus_read_ul(NULL, xbusd->xbusd_otherend,
 		    "tx-ring-ref", &tx_ring_ref, 10);

Reply via email to