Module Name:    src
Committed By:   martin
Date:           Wed Aug 15 12:04:02 UTC 2018

Modified Files:
        src/sys/arch/xen/xen [netbsd-8]: xennetback_xenbus.c

Log Message:
Pull up following revision(s) (requested by dolecek in ticket #973):

        sys/arch/xen/xen/xennetback_xenbus.c: revision 1.68 (patch)

disestablish interrupt handler regardless of the state whenever it was
setup, i.e. also when the instance is DISCONNECTING already
fixes PR port-xen/53487 by Bert Kiers; fix found and reported by
Dennis Lindroos

XXX pullup netbsd-8


To generate a diff of this commit:
cvs rdiff -u -r1.58.8.2 -r1.58.8.3 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.58.8.2 src/sys/arch/xen/xen/xennetback_xenbus.c:1.58.8.3
--- src/sys/arch/xen/xen/xennetback_xenbus.c:1.58.8.2	Thu Jul 26 23:55:29 2018
+++ src/sys/arch/xen/xen/xennetback_xenbus.c	Wed Aug 15 12:04:02 2018
@@ -1,4 +1,4 @@
-/*      $NetBSD: xennetback_xenbus.c,v 1.58.8.2 2018/07/26 23:55:29 snj Exp $      */
+/*      $NetBSD: xennetback_xenbus.c,v 1.58.8.3 2018/08/15 12:04:02 martin Exp $      */
 
 /*
  * Copyright (c) 2006 Manuel Bouyer.
@@ -26,7 +26,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: xennetback_xenbus.c,v 1.58.8.2 2018/07/26 23:55:29 snj Exp $");
+__KERNEL_RCSID(0, "$NetBSD: xennetback_xenbus.c,v 1.58.8.3 2018/08/15 12:04:02 martin Exp $");
 
 #include "opt_xen.h"
 
@@ -386,10 +386,12 @@ xennetback_xenbus_destroy(void *arg)
 
 	aprint_verbose_ifnet(&xneti->xni_if, "disconnecting\n");
 
-	if (xneti->xni_status == CONNECTED) {
+	if (xneti->xni_evtchn != 0) {
 		hypervisor_mask_event(xneti->xni_evtchn);
 		event_remove_handler(xneti->xni_evtchn, xennetback_evthandler,
 		    xneti);
+		xneti->xni_evtchn = 0;
+
 		if (xneti->xni_softintr) {
 			softint_disestablish(xneti->xni_softintr);
 			xneti->xni_softintr = NULL;

Reply via email to