http://defect.opensolaris.org/bz/show_bug.cgi?id=8390





--- Comment #6 from Anurag S. Maskey <Anurag.Maskey at Sun.COM>  2009-04-23 
18:14:43 ---
Recursive locking complicates things to a whole new level.  I don't think we
should go into allowing recursive locking.

The recursive locking that's causing this deadlock shouldn't happen in the code
at all.   The problem is in lines 1092-1096 in ncu_phys.c.  When the link NCU
enters the LINK_UP state, we synthesize an interface state event for the IP NCU
to kickstart the IP NCU state machine.  However, the code isn't exactly doing
that.  The code is searching for event->event_object, which is actually a link
NCU (datalink:bge0).  That code should actually be looking for the IP NCU
(ip:bge0).  I'd sent you a private email asking if that was the intention.  If
ip:bge0 is searched for, then there is no recursive locking/deadlock.

-            if_obj = nwamd_object_find(
-                NWAM_OBJECT_TYPE_NCU,
-                event->event_object);
-            if (if_obj)
-                synth_interface_event(name);
+            char *ip_name;
+            if (nwam_ncu_name_to_typed_name(name, NWAM_NCU_TYPE_IP,
+                &ip_name) == NWAM_SUCCESS) {
+                if_obj = nwamd_object_find(NWAM_OBJECT_TYPE_NCU,
+                    ip_name);
+                if (if_obj) {
+                    synth_interface_event(name);
+                    nwamd_object_unlock(if_obj);
+                }
+                free(ip_name); 

The other place when the recursive deadlock happens is in _handle_fini_event().
 Since it calls _handle_disable_event(), there's a deadlock on the lock.  The
fix here is to release the lock before calling _handle_disable_event().

-- 
Configure bugmail: http://defect.opensolaris.org/bz/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.

Reply via email to