All of lore.kernel.org
 help / color / mirror / Atom feed
* [Xenomai-core] [PATCH 1/2] Don't remove_proc_entry under nklock
@ 2007-06-03  9:23 Jan Kiszka
  0 siblings, 0 replies; only message in thread
From: Jan Kiszka @ 2007-06-03  9:23 UTC (permalink / raw)
  To: xenomai-core


[-- Attachment #1.1: Type: text/plain, Size: 0 bytes --]



[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1.2: fix-iface-proc.patch --]
[-- Type: text/x-patch; name="fix-iface-proc.patch", Size: 2456 bytes --]

---
 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  <rpm@xenomai.org>
 
 	* ksrc/skins/psos+, src/skins/psos+, include/psos+/psos.h: Add

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 249 bytes --]

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2007-06-03  9:23 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-06-03  9:23 [Xenomai-core] [PATCH 1/2] Don't remove_proc_entry under nklock Jan Kiszka

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.