changeset 3811:7f48bd1c24e5

6479888 dtrace_detach() deadlocks with cpu_configure() via cpu_lock
author bm42561
date Tue, 13 Mar 2007 16:38:14 -0700
parents fccde451ce45
children 07894abe087c
files usr/src/uts/sun4u/ngdr/io/dr_cpu.c
diffstat 1 files changed, 3 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/usr/src/uts/sun4u/ngdr/io/dr_cpu.c	Tue Mar 13 15:00:42 2007 -0700
+++ b/usr/src/uts/sun4u/ngdr/io/dr_cpu.c	Tue Mar 13 16:38:14 2007 -0700
@@ -19,7 +19,7 @@
  * CDDL HEADER END
  */
 /*
- * Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
+ * Copyright 2007 Sun Microsystems, Inc.  All rights reserved.
  * Use is subject to license terms.
  */
 
@@ -319,6 +319,7 @@
 	 * devinfo tree branches
 	 */
 	dr_lock_status(hp->h_bd);
+	ndi_devi_enter(ddi_root_node(), (int *)(&hp->h_ndi));
 	mutex_enter(&cpu_lock);
 
 	return (0);
@@ -368,7 +369,6 @@
 	static fn_t	f = "dr_post_attach_cpu";
 
 	PR_CPU("%s...\n", f);
-	hp->h_ndi = 0;
 
 	/* Startup and online newly-attached CPUs */
 	for (i = 0; i < devnum; i++) {
@@ -404,6 +404,7 @@
 	}
 
 	mutex_exit(&cpu_lock);
+	ndi_devi_exit(ddi_root_node(), hp->h_ndi);
 	dr_unlock_status(hp->h_bd);
 
 	if (errflag)