* [Xenomai-help] unable to load nucleus module: unknown symbol
@ 2009-10-30 3:10 Jeff Weber
2009-11-05 21:13 ` Philippe Gerum
0 siblings, 1 reply; 2+ messages in thread
From: Jeff Weber @ 2009-10-30 3:10 UTC (permalink / raw)
To: xenomai
I've built the xeno_nucleus as a module. Neither depmod, nor modprobe
can resolve the symbol "find_task_by_pid_ns":
depmod:
WARNING:
/lib/modules/2.6.31.5-xenomai-2.4.10/kernel/kernel/xenomai/nucleus/xeno_nucleus.ko
needs unknown symbol find_task_by_pid_ns
modprobe [dmesg]:
[ 426.728630] xeno_nucleus: Unknown symbol find_task_by_pid_ns
Curiously, this symbol is in both my build System.map, and the kernel
bash # grep find_task_by_pid_ns System.map
c102ecf6 T find_task_by_pid_ns
bash # cat /proc/kallsyms | grep find_task_by_pid_ns
c102ecf6 T find_task_by_pid_ns
so this symbol should be publicly available. I also noticed there is no
EXPORT_SYMBOL() for find_task_by_pid_ns in the kernel code.
Any ideas what's keeping my xeno_nucleus.ko module from loading?
My config:
linux-2.6.31.5 (current stable)
xenomai-2.4.10
adeos-ipipe-2.6.31.1-x86-2.4-06.patch
thanks,
Jeff
This e-mail message and any attachments are confidential and may be privileged.
If you are not the intended recipient please notify American Superconductor Corporation
immediately by replying to this message or by sending a message to postmaster@domain.hid
and destroy all copies of this message and any attachments.
Thank you.
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [Xenomai-help] unable to load nucleus module: unknown symbol
2009-10-30 3:10 [Xenomai-help] unable to load nucleus module: unknown symbol Jeff Weber
@ 2009-11-05 21:13 ` Philippe Gerum
0 siblings, 0 replies; 2+ messages in thread
From: Philippe Gerum @ 2009-11-05 21:13 UTC (permalink / raw)
To: Jeff Weber; +Cc: xenomai
On Thu, 2009-10-29 at 22:10 -0500, Jeff Weber wrote:
> I've built the xeno_nucleus as a module. Neither depmod, nor modprobe
> can resolve the symbol "find_task_by_pid_ns":
>
> depmod:
> WARNING:
> /lib/modules/2.6.31.5-xenomai-2.4.10/kernel/kernel/xenomai/nucleus/xeno_nucleus.ko
> needs unknown symbol find_task_by_pid_ns
>
> modprobe [dmesg]:
> [ 426.728630] xeno_nucleus: Unknown symbol find_task_by_pid_ns
>
> Curiously, this symbol is in both my build System.map, and the kernel
>
> bash # grep find_task_by_pid_ns System.map
> c102ecf6 T find_task_by_pid_ns
>
> bash # cat /proc/kallsyms | grep find_task_by_pid_ns
> c102ecf6 T find_task_by_pid_ns
>
> so this symbol should be publicly available. I also noticed there is no
> EXPORT_SYMBOL() for find_task_by_pid_ns in the kernel code.
>
> Any ideas what's keeping my xeno_nucleus.ko module from loading?
>
> My config:
> linux-2.6.31.5 (current stable)
> xenomai-2.4.10
> adeos-ipipe-2.6.31.1-x86-2.4-06.patch
Please note that 2.6.31 is not officially supported by 2.4.x; at least,
not for all architectures. 2.5.x supports 2.6.31 and beyond.
Aside of this, the missing symbol is no more exported by 2.6.31 albeit
it used to be in 2.6.30. I guess that most people compile the nucleus
statically inside the kernel, so this has not been noticed before.
diff --git a/include/asm-generic/wrappers.h b/include/asm-generic/wrappers.h
index 18af70b..62f1d6e 100644
--- a/include/asm-generic/wrappers.h
+++ b/include/asm-generic/wrappers.h
@@ -480,8 +480,16 @@ unsigned long find_next_bit(const unsigned long *addr,
#include <linux/semaphore.h>
#include <linux/pid.h>
-#define find_task_by_pid(nr) \
- find_task_by_pid_ns(nr, &init_pid_ns)
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,31)
+static inline struct task_struct *wrap_find_task_by_pid(pid_t nr)
+{
+ return pid_task(find_pid_ns(nr, &init_pid_ns), PIDTYPE_PID);
+}
+#else /* LINUX_VERSION_CODE < 2.6.31 */
+#define wrap_find_task_by_pid(nr) \
+ find_task_by_pid_ns(nr, &init_pid_ns)
+#endif /* LINUX_VERSION_CODE < 2.6.31 */
+
#define kill_proc(pid, sig, priv) \
kill_proc_info(sig, (priv) ? SEND_SIG_PRIV : SEND_SIG_NOINFO, pid)
diff --git a/ksrc/nucleus/shadow.c b/ksrc/nucleus/shadow.c
index d6d1203..1eae0a1 100644
--- a/ksrc/nucleus/shadow.c
+++ b/ksrc/nucleus/shadow.c
@@ -1687,7 +1687,7 @@ void xnshadow_signal_completion(xncompletion_t __user *u_completion, int err)
read_lock(&tasklist_lock);
- p = find_task_by_pid(completion.pid);
+ p = wrap_find_task_by_pid(completion.pid);
if (p)
wake_up_process(p);
>
> thanks,
> Jeff
> This e-mail message and any attachments are confidential and may be privileged.
> If you are not the intended recipient please notify American Superconductor Corporation
> immediately by replying to this message or by sending a message to postmaster@domain.hid
> and destroy all copies of this message and any attachments.
> Thank you.
>
>
> _______________________________________________
> Xenomai-help mailing list
> Xenomai-help@domain.hid
> https://mail.gna.org/listinfo/xenomai-help
--
Philippe.
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2009-11-05 21:13 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-10-30 3:10 [Xenomai-help] unable to load nucleus module: unknown symbol Jeff Weber
2009-11-05 21:13 ` Philippe Gerum
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.