---
 ChangeLog             |    3 +++
 ksrc/nucleus/module.c |    5 ++---
 ksrc/nucleus/shadow.c |   14 +++++++++++---
 3 files changed, 16 insertions(+), 6 deletions(-)

Index: xenomai/ksrc/nucleus/shadow.c
===================================================================
--- xenomai.orig/ksrc/nucleus/shadow.c
+++ xenomai/ksrc/nucleus/shadow.c
@@ -115,7 +115,7 @@ static int nucleus_muxid = -1;
 
 void xnpod_declare_iface_proc(struct xnskentry *iface);
 
-void xnpod_discard_iface_proc(struct xnskentry *iface);
+void xnpod_discard_iface_proc(const char *iface);
 
 #ifdef CONFIG_XENO_OPT_PRIOCPL
 
@@ -2266,7 +2266,7 @@ int xnshadow_register_interface(const ch
 }
 
 /*
- * xnshadow_unregister_interface() -- Unregister a new skin/interface.
+ * xnshadow_unregister_interface() -- Unregister a skin/interface.
  * NOTE: an interface can be unregistered without its pod being
  * necessarily active.
  */
@@ -2287,7 +2287,15 @@ int xnshadow_unregister_interface(int mu
 		muxtable[muxid].magic = 0;
 		xnarch_atomic_set(&muxtable[muxid].refcnt, -1);
 #ifdef CONFIG_PROC_FS
-		xnpod_discard_iface_proc(muxtable + muxid);
+		{
+			const char *name = muxtable[muxid].name;
+			muxtable[muxid].proc = NULL;
+			xnlock_put_irqrestore(&nklock, s);
+
+			xnpod_discard_iface_proc(name);
+
+			return 0;
+		}
 #endif /* CONFIG_PROC_FS */
 	} else
 		err = -EBUSY;
Index: xenomai/ksrc/nucleus/module.c
===================================================================
--- xenomai.orig/ksrc/nucleus/module.c
+++ xenomai/ksrc/nucleus/module.c
@@ -939,10 +939,9 @@ void xnpod_declare_iface_proc(struct xns
 				    iface_proc_root);
 }
 
-void xnpod_discard_iface_proc(struct xnskentry *iface)
+void xnpod_discard_iface_proc(const char *iface_name)
 {
-	remove_proc_entry(iface->name, iface_proc_root);
-	iface->proc = NULL;
+	remove_proc_entry(iface_name, iface_proc_root);
 }
 
 #endif /* CONFIG_XENO_OPT_PERVASIVE */
Index: xenomai/ChangeLog
===================================================================
--- xenomai.orig/ChangeLog
+++ xenomai/ChangeLog
@@ -3,6 +3,9 @@
 	* ksrc/skins/rtdm/device.c (rtdm_dev_register): Unconditinally
 	check if mandatory close_nrt is provided.
 
+	* ksrc/nucleus/{module.c, shadow.c}: Move remove_proc_entry out of
+	nklock.
+
 2007-06-02  Philippe Gerum  <[EMAIL PROTECTED]>
 
 	* ksrc/skins/psos+, src/skins/psos+, include/psos+/psos.h: Add

Attachment: signature.asc
Description: OpenPGP digital signature

_______________________________________________
Xenomai-core mailing list
Xenomai-core@gna.org
https://mail.gna.org/listinfo/xenomai-core

Reply via email to