[IA64] Change SET_PERSONALITY to comply with comment in binfmt_elf.c.
authorRobin Holt <holt@sgi.com>
Tue, 6 Dec 2005 02:02:31 +0000 (20:02 -0600)
committerTony Luck <tony.luck@intel.com>
Tue, 6 Dec 2005 17:12:34 +0000 (09:12 -0800)
commitbd1d6e2451f2bb0132416fda4d129c4f57a827bc
tree64fc1ba7d4734ea5ecec8942795b32a32e4623a4
parentacb7f67280128a9ddaa756ff10212391d28caec4
[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>
arch/ia64/ia32/binfmt_elf32.c
arch/ia64/ia32/ia32priv.h
arch/ia64/kernel/process.c
include/asm-ia64/ia32.h