[PATCH] 2.5.37 export find_task_by_pid

Hiroshi Takekawa (sian@big.or.jp)
Sat, 21 Sep 2002 02:36:22 +0900 (JST)


Hi,

ipt_owner calls find_task_by_pid.
When compiled as module, unresolved error happens.
My fix is below. I don't know this is right, though error has gone.

--
Hiroshi Takekawa <sian@big.or.jp>

diff -Naur linux-2.5.37/kernel/Makefile linux-2.5.37.patched/kernel/Makefile --- linux-2.5.37/kernel/Makefile Sat Sep 21 02:23:20 2002 +++ linux-2.5.37.patched/kernel/Makefile Sat Sep 21 02:12:41 2002 @@ -3,7 +3,7 @@ # export-objs = signal.o sys.o kmod.o context.o ksyms.o pm.o exec_domain.o \ - printk.o platform.o suspend.o dma.o + printk.o platform.o suspend.o dma.o pid.o obj-y = sched.o fork.o exec_domain.o panic.o printk.o \ module.o exit.o itimer.o time.o softirq.o resource.o \ diff -Naur linux-2.5.37/kernel/pid.c linux-2.5.37.patched/kernel/pid.c --- linux-2.5.37/kernel/pid.c Sat Sep 21 02:23:20 2002 +++ linux-2.5.37.patched/kernel/pid.c Sat Sep 21 02:09:58 2002 @@ -19,6 +19,7 @@ * bytes. The typical fastpath is a single successful setbit. Freeing is O(1). */ +#include <linux/module.h> #include <linux/mm.h> #include <linux/slab.h> #include <linux/init.h> @@ -191,7 +192,7 @@ free_pidmap(nr); } -extern task_t *find_task_by_pid(int nr) +task_t *find_task_by_pid(int nr) { struct pid *pid = find_pid(PIDTYPE_PID, nr); @@ -199,6 +200,7 @@ return NULL; return pid_task(pid->task_list.next, PIDTYPE_PID); } +EXPORT_SYMBOL(find_task_by_pid); void __init pidhash_init(void) { - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/