Subject: + exec-kill-the-unnecessary-mm-def_flags-setting-in-load_elf_binary.patch added to -mm tree To: athorlton@xxxxxxx,aarcange@xxxxxxxxxx,borntraeger@xxxxxxxxxx,ebiederm@xxxxxxxxxxxx,gerald.schaefer@xxxxxxxxxx,hannes@xxxxxxxxxxx,heiko.carstens@xxxxxxxxxx,kirill.shutemov@xxxxxxxxxxxxxxx,mgorman@xxxxxxx,mingo@xxxxxxxxxx,oleg@xxxxxxxxxx,pbonzini@xxxxxxxxxx,peterz@xxxxxxxxxxxxx,riel@xxxxxxxxxx,rientjes@xxxxxxxxxx,schwidefsky@xxxxxxxxxx,viro@xxxxxxxxxxxxxxxxxx From: akpm@xxxxxxxxxxxxxxxxxxxx Date: Tue, 25 Feb 2014 15:53:16 -0800 The patch titled Subject: exec: kill the unnecessary mm->def_flags setting in load_elf_binary() has been added to the -mm tree. Its filename is exec-kill-the-unnecessary-mm-def_flags-setting-in-load_elf_binary.patch This patch should soon appear at http://ozlabs.org/~akpm/mmots/broken-out/exec-kill-the-unnecessary-mm-def_flags-setting-in-load_elf_binary.patch and later at http://ozlabs.org/~akpm/mmotm/broken-out/exec-kill-the-unnecessary-mm-def_flags-setting-in-load_elf_binary.patch Before you just go and hit "reply", please: a) Consider who else should be cc'ed b) Prefer to cc a suitable mailing list as well c) Ideally: find the original patch on the mailing list and do a reply-to-all to that, adding suitable additional cc's *** Remember to use Documentation/SubmitChecklist when testing your code *** The -mm tree is included into linux-next and is updated there every 3-4 working days ------------------------------------------------------ From: Alex Thorlton <athorlton@xxxxxxx> Subject: 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@xxxxxxx> Suggested-by: Oleg Nesterov <oleg@xxxxxxxxxx> Cc: Gerald Schaefer <gerald.schaefer@xxxxxxxxxx> Cc: Martin Schwidefsky <schwidefsky@xxxxxxxxxx> Cc: Heiko Carstens <heiko.carstens@xxxxxxxxxx> Cc: Christian Borntraeger <borntraeger@xxxxxxxxxx> Cc: Paolo Bonzini <pbonzini@xxxxxxxxxx> Cc: "Kirill A. Shutemov" <kirill.shutemov@xxxxxxxxxxxxxxx> Cc: Mel Gorman <mgorman@xxxxxxx> Acked-by: Rik van Riel <riel@xxxxxxxxxx> Cc: Ingo Molnar <mingo@xxxxxxxxxx> Cc: Peter Zijlstra <peterz@xxxxxxxxxxxxx> Cc: Andrea Arcangeli <aarcange@xxxxxxxxxx> Cc: Oleg Nesterov <oleg@xxxxxxxxxx> Cc: "Eric W. Biederman" <ebiederm@xxxxxxxxxxxx> Cc: Alexander Viro <viro@xxxxxxxxxxxxxxxxxx> Cc: Johannes Weiner <hannes@xxxxxxxxxxx> Cc: David Rientjes <rientjes@xxxxxxxxxx> Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> --- fs/binfmt_elf.c | 4 ---- 1 file changed, 4 deletions(-) diff -puN fs/binfmt_elf.c~exec-kill-the-unnecessary-mm-def_flags-setting-in-load_elf_binary fs/binfmt_elf.c --- a/fs/binfmt_elf.c~exec-kill-the-unnecessary-mm-def_flags-setting-in-load_elf_binary +++ a/fs/binfmt_elf.c @@ -579,7 +579,6 @@ static int load_elf_binary(struct linux_ 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; @@ -719,9 +718,6 @@ static int load_elf_binary(struct linux_ 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. */ SET_PERSONALITY(loc->elf_ex); _ Patches currently in -mm which might be from athorlton@xxxxxxx are mm-revert-thp-make-madv_hugepage-check-for-mm-def_flags.patch mm-thp-add-vm_init_def_mask-and-prctl_thp_disable.patch exec-kill-the-unnecessary-mm-def_flags-setting-in-load_elf_binary.patch -- To unsubscribe from this list: send the line "unsubscribe mm-commits" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html