Commit f3b19a5c authored by Andreas Schwab's avatar Andreas Schwab Committed by David Mosberger

[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.
parent 059d18e3
...@@ -582,6 +582,15 @@ kernel_thread (int (*fn)(void *), void *arg, unsigned long flags) ...@@ -582,6 +582,15 @@ kernel_thread (int (*fn)(void *), void *arg, unsigned long flags)
tid = clone(flags | CLONE_VM | CLONE_UNTRACED, 0); tid = clone(flags | CLONE_VM | CLONE_UNTRACED, 0);
if (parent != current) { 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); result = (*fn)(arg);
_exit(result); _exit(result);
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment