svn commit: r202373 - stable/8/sys/sparc64/sparc64

Marius Strobl marius at FreeBSD.org
Fri Jan 15 15:36:13 UTC 2010


Author: marius
Date: Fri Jan 15 15:36:12 2010
New Revision: 202373
URL: http://svn.freebsd.org/changeset/base/202373

Log:
  MFC: r200947
  
  Add missing locking in intr_bind().

Modified:
  stable/8/sys/sparc64/sparc64/intr_machdep.c
Directory Properties:
  stable/8/sys/   (props changed)
  stable/8/sys/amd64/include/xen/   (props changed)
  stable/8/sys/cddl/contrib/opensolaris/   (props changed)
  stable/8/sys/contrib/dev/acpica/   (props changed)
  stable/8/sys/contrib/pf/   (props changed)
  stable/8/sys/dev/xen/xenpci/   (props changed)

Modified: stable/8/sys/sparc64/sparc64/intr_machdep.c
==============================================================================
--- stable/8/sys/sparc64/sparc64/intr_machdep.c	Fri Jan 15 15:28:58 2010	(r202372)
+++ stable/8/sys/sparc64/sparc64/intr_machdep.c	Fri Jan 15 15:36:12 2010	(r202373)
@@ -450,13 +450,19 @@ int
 intr_bind(int vec, u_char cpu)
 {
 	struct intr_vector *iv;
+	int error;
 
 	if (vec < 0 || vec >= IV_MAX)
 		return (EINVAL);
+	sx_xlock(&intr_table_lock);
 	iv = &intr_vectors[vec];
-	if (iv == NULL)
+	if (iv == NULL) {
+		sx_xunlock(&intr_table_lock);
 		return (EINVAL);
-	return (intr_event_bind(iv->iv_event, cpu));
+	}
+	error = intr_event_bind(iv->iv_event, cpu);
+	sx_xunlock(&intr_table_lock);
+	return (error);
 }
 
 /*


More information about the svn-src-stable mailing list