diff options
author | Robin Holt <holt@sgi.com> | 2005-12-05 21:02:31 -0500 |
---|---|---|
committer | Tony Luck <tony.luck@intel.com> | 2005-12-06 12:12:34 -0500 |
commit | bd1d6e2451f2bb0132416fda4d129c4f57a827bc (patch) | |
tree | 64fc1ba7d4734ea5ecec8942795b32a32e4623a4 /arch/ia64/kernel/process.c | |
parent | acb7f67280128a9ddaa756ff10212391d28caec4 (diff) |
[IA64] Change SET_PERSONALITY to comply with comment in binfmt_elf.c.
We have a customer application which trips a bug. The problem arises
when a driver attempts to call do_munmap on an area which is mapped, but
because current->thread.task_size has been set to 0xC0000000, the call
to do_munmap fails thinking it is an unmap beyond the user's address
space.
The comment in fs/binfmt_elf.c in load_elf_library() before the call
to SET_PERSONALITY() indicates that task_size must not be changed for
the running application until flush_thread, but is for ia64 executing
ia32 binaries.
This patch moves the setting of task_size from SET_PERSONALITY() to
flush_thread() as indicated. The customer application no longer is able
to trip the bug.
Signed-off-by: Robin Holt <holt@sgi.com>
Signed-off-by: Tony Luck <tony.luck@intel.com>
Diffstat (limited to 'arch/ia64/kernel/process.c')
-rw-r--r-- | arch/ia64/kernel/process.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/arch/ia64/kernel/process.c b/arch/ia64/kernel/process.c index 2e33665d9c1..a4da715a360 100644 --- a/arch/ia64/kernel/process.c +++ b/arch/ia64/kernel/process.c | |||
@@ -721,8 +721,11 @@ flush_thread (void) | |||
721 | /* drop floating-point and debug-register state if it exists: */ | 721 | /* drop floating-point and debug-register state if it exists: */ |
722 | current->thread.flags &= ~(IA64_THREAD_FPH_VALID | IA64_THREAD_DBG_VALID); | 722 | current->thread.flags &= ~(IA64_THREAD_FPH_VALID | IA64_THREAD_DBG_VALID); |
723 | ia64_drop_fpu(current); | 723 | ia64_drop_fpu(current); |
724 | if (IS_IA32_PROCESS(ia64_task_regs(current))) | 724 | if (IS_IA32_PROCESS(ia64_task_regs(current))) { |
725 | ia32_drop_partial_page_list(current); | 725 | ia32_drop_partial_page_list(current); |
726 | current->thread.task_size = IA32_PAGE_OFFSET; | ||
727 | set_fs(USER_DS); | ||
728 | } | ||
726 | } | 729 | } |
727 | 730 | ||
728 | /* | 731 | /* |