Module Name:    src
Committed By:   martin
Date:           Thu Nov 14 15:58:06 UTC 2019

Modified Files:
        src/sys/arch/x86/x86 [netbsd-8]: intr.c

Log Message:
Pull up following revision(s) (requested by msaitoh in ticket #1437):

        sys/arch/x86/x86/intr.c: revision 1.147

Fix a bug that evcnt_detach() called twice when the idt vector is full.

OK'd by knakahara.


To generate a diff of this commit:
cvs rdiff -u -r1.101.2.6 -r1.101.2.7 src/sys/arch/x86/x86/intr.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/x86/x86/intr.c
diff -u src/sys/arch/x86/x86/intr.c:1.101.2.6 src/sys/arch/x86/x86/intr.c:1.101.2.7
--- src/sys/arch/x86/x86/intr.c:1.101.2.6	Sat Mar  9 17:10:19 2019
+++ src/sys/arch/x86/x86/intr.c	Thu Nov 14 15:58:06 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: intr.c,v 1.101.2.6 2019/03/09 17:10:19 martin Exp $	*/
+/*	$NetBSD: intr.c,v 1.101.2.7 2019/11/14 15:58:06 martin Exp $	*/
 
 /*-
  * Copyright (c) 2007, 2008, 2009 The NetBSD Foundation, Inc.
@@ -133,7 +133,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: intr.c,v 1.101.2.6 2019/03/09 17:10:19 martin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: intr.c,v 1.101.2.7 2019/11/14 15:58:06 martin Exp $");
 
 #include "opt_intrdebug.h"
 #include "opt_multiprocessor.h"
@@ -591,8 +591,10 @@ intr_free_io_intrsource_direct(struct in
 	SIMPLEQ_REMOVE(&io_interrupt_sources, isp, intrsource, is_list);
 
 	/* Is this interrupt established? */
-	if (isp->is_evname[0] != '\0')
+	if (isp->is_evname[0] != '\0') {
 		evcnt_detach(&isp->is_evcnt);
+		isp->is_evname[0] = '\0';
+	}
 
 	kmem_free(isp->is_saved_evcnt,
 	    sizeof(*(isp->is_saved_evcnt)) * ncpu);
@@ -782,6 +784,7 @@ intr_allocate_slot(struct pic *pic, int 
 	}
 	if (idtvec == 0) {
 		evcnt_detach(&ci->ci_isources[slot]->is_evcnt);
+		ci->ci_isources[slot]->is_evname[0] = '\0';
 		ci->ci_isources[slot] = NULL;
 		return EBUSY;
 	}

Reply via email to