Commit ab0e113f authored by Alex Thorlton's avatar Alex Thorlton Committed by Linus Torvalds
Browse files

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: default avatarAlex Thorlton <>
Suggested-by: default avatarOleg Nesterov <>
Cc: Gerald Schaefer <>
Cc: Martin Schwidefsky <>
Cc: Heiko Carstens <>
Cc: Christian Borntraeger <>
Cc: Paolo Bonzini <>
Cc: "Kirill A. Shutemov" <>
Cc: Mel Gorman <>
Acked-by: default avatarRik van Riel <>
Cc: Ingo Molnar <>
Cc: Peter Zijlstra <>
Cc: Andrea Arcangeli <>
Cc: Oleg Nesterov <>
Cc: "Eric W. Biederman" <>
Cc: Alexander Viro <>
Cc: Johannes Weiner <>
Cc: David Rientjes <>
Cc: Paolo Bonzini <>
Signed-off-by: default avatarAndrew Morton <>
Signed-off-by: default avatarLinus Torvalds <>
parent a0715cc2
......@@ -584,7 +584,6 @@ static int load_elf_binary(struct linux_binprm *bprm)
unsigned long start_code, end_code, start_data, end_data;
unsigned long reloc_func_desc __maybe_unused = 0;
int executable_stack = EXSTACK_DEFAULT;
unsigned long def_flags = 0;
struct pt_regs *regs = current_pt_regs();
struct {
struct elfhdr elf_ex;
......@@ -724,9 +723,6 @@ static int load_elf_binary(struct linux_binprm *bprm)
if (retval)
goto out_free_dentry;
/* OK, This is the point of no return */
current->mm->def_flags = def_flags;
/* Do this immediately, since STACK_TOP as used in setup_arg_pages
may depend on the personality. */
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