svn commit: r202374 - stable/7/sys/sparc64/sparc64

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


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

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

Modified:
  stable/7/sys/sparc64/sparc64/intr_machdep.c
Directory Properties:
  stable/7/sys/   (props changed)
  stable/7/sys/cddl/contrib/opensolaris/   (props changed)
  stable/7/sys/contrib/dev/acpica/   (props changed)
  stable/7/sys/contrib/pf/   (props changed)

Modified: stable/7/sys/sparc64/sparc64/intr_machdep.c
==============================================================================
--- stable/7/sys/sparc64/sparc64/intr_machdep.c	Fri Jan 15 15:36:12 2010	(r202373)
+++ stable/7/sys/sparc64/sparc64/intr_machdep.c	Fri Jan 15 15:36:24 2010	(r202374)
@@ -451,13 +451,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