From f3b19a5cf37ed48d410bc6e51903295881ed8128 Mon Sep 17 00:00:00 2001 From: Andreas Schwab Date: Wed, 26 Mar 2003 20:43:01 -0800 Subject: [PATCH] [PATCH] ia64: Fix request_module from ia32 process When an ia32 process triggers request_module the kernel cannot execute modprobe because the kernel thread still has the ia32 address limits in force. I think a kernel thread should always have the ia64 address limits, similar to what sys32_execve is doing. --- arch/ia64/kernel/process.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/arch/ia64/kernel/process.c b/arch/ia64/kernel/process.c index 69be93e780b57..132a4a643fa75 100644 --- a/arch/ia64/kernel/process.c +++ b/arch/ia64/kernel/process.c @@ -582,6 +582,15 @@ kernel_thread (int (*fn)(void *), void *arg, unsigned long flags) tid = clone(flags | CLONE_VM | CLONE_UNTRACED, 0); if (parent != current) { +#ifdef CONFIG_IA32_SUPPORT + if (IS_IA32_PROCESS(ia64_task_regs(current))) { + /* A kernel thread is always a 64-bit process. */ + current->thread.map_base = DEFAULT_MAP_BASE; + current->thread.task_size = DEFAULT_TASK_SIZE; + ia64_set_kr(IA64_KR_IO_BASE, current->thread.old_iob); + ia64_set_kr(IA64_KR_TSSD, current->thread.old_k1); + } +#endif result = (*fn)(arg); _exit(result); } -- 2.53.0