diff options
author | Alex Thorlton <athorlton@sgi.com> | 2014-04-07 18:37:12 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2014-04-07 19:35:52 -0400 |
commit | ab0e113f6bee71a3933755d2c9ae41fcee631800 (patch) | |
tree | b19d7819b378545277a5ed0127d3d8acb138507c /fs/binfmt_elf.c | |
parent | a0715cc22601e8830ace98366c0c2bd8da52af52 (diff) |
exec: kill the unnecessary mm->def_flags setting in load_elf_binary()
load_elf_binary() sets current->mm->def_flags = def_flags and def_flags
is always zero. Not only this looks strange, this is unnecessary
because mm_init() has already set ->def_flags = 0.
Signed-off-by: Alex Thorlton <athorlton@sgi.com>
Suggested-by: Oleg Nesterov <oleg@redhat.com>
Cc: Gerald Schaefer <gerald.schaefer@de.ibm.com>
Cc: Martin Schwidefsky <schwidefsky@de.ibm.com>
Cc: Heiko Carstens <heiko.carstens@de.ibm.com>
Cc: Christian Borntraeger <borntraeger@de.ibm.com>
Cc: Paolo Bonzini <pbonzini@redhat.com>
Cc: "Kirill A. Shutemov" <kirill.shutemov@linux.intel.com>
Cc: Mel Gorman <mgorman@suse.de>
Acked-by: Rik van Riel <riel@redhat.com>
Cc: Ingo Molnar <mingo@kernel.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Andrea Arcangeli <aarcange@redhat.com>
Cc: Oleg Nesterov <oleg@redhat.com>
Cc: "Eric W. Biederman" <ebiederm@xmission.com>
Cc: Alexander Viro <viro@zeniv.linux.org.uk>
Cc: Johannes Weiner <hannes@cmpxchg.org>
Cc: David Rientjes <rientjes@google.com>
Cc: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'fs/binfmt_elf.c')
-rw-r--r-- | fs/binfmt_elf.c | 4 |
1 files changed, 0 insertions, 4 deletions
diff --git a/fs/binfmt_elf.c b/fs/binfmt_elf.c index 0f59799fa105..aa3cb626671e 100644 --- a/fs/binfmt_elf.c +++ b/fs/binfmt_elf.c | |||
@@ -584,7 +584,6 @@ static int load_elf_binary(struct linux_binprm *bprm) | |||
584 | unsigned long start_code, end_code, start_data, end_data; | 584 | unsigned long start_code, end_code, start_data, end_data; |
585 | unsigned long reloc_func_desc __maybe_unused = 0; | 585 | unsigned long reloc_func_desc __maybe_unused = 0; |
586 | int executable_stack = EXSTACK_DEFAULT; | 586 | int executable_stack = EXSTACK_DEFAULT; |
587 | unsigned long def_flags = 0; | ||
588 | struct pt_regs *regs = current_pt_regs(); | 587 | struct pt_regs *regs = current_pt_regs(); |
589 | struct { | 588 | struct { |
590 | struct elfhdr elf_ex; | 589 | struct elfhdr elf_ex; |
@@ -724,9 +723,6 @@ static int load_elf_binary(struct linux_binprm *bprm) | |||
724 | if (retval) | 723 | if (retval) |
725 | goto out_free_dentry; | 724 | goto out_free_dentry; |
726 | 725 | ||
727 | /* OK, This is the point of no return */ | ||
728 | current->mm->def_flags = def_flags; | ||
729 | |||
730 | /* Do this immediately, since STACK_TOP as used in setup_arg_pages | 726 | /* Do this immediately, since STACK_TOP as used in setup_arg_pages |
731 | may depend on the personality. */ | 727 | may depend on the personality. */ |
732 | SET_PERSONALITY(loc->elf_ex); | 728 | SET_PERSONALITY(loc->elf_ex); |