Skip to contentSkip to conversation

+ exec-kill-the-unnecessary-mm-def_flags-setting-in-load_elf_binary.patch added to -mm tree

PATCH [email protected] 1 participant 1 message Feb 25, 2014

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

Subject: + exec-kill-the-unnecessary-mm-def_flags-setting-in-load_elf_binary.patch added to -mm tree
To: [email protected],[email protected],[email protected],[email protected],[email protected],[email protected],[email protected],[email protected],[email protected],[email protected],[email protected],[email protected],[email protected],[email protected],[email protected],[email protected],[email protected]
From: [email protected]
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 <[email protected]>
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.

Cc Gerald Schaefer <[email protected]>
Cc Martin Schwidefsky <[email protected]>
Cc Heiko Carstens <[email protected]>
Cc Christian Borntraeger <[email protected]>
Cc Paolo Bonzini <[email protected]>
Cc "Kirill A. Shutemov" <[email protected]>
Cc Mel Gorman <[email protected]>
Cc Ingo Molnar <[email protected]>
Cc Peter Zijlstra <[email protected]>
Cc Andrea Arcangeli <[email protected]>
Cc Oleg Nesterov <[email protected]>
Cc "Eric W. Biederman" <[email protected]>
Cc Alexander Viro <[email protected]>
Cc Johannes Weiner <[email protected]>
Cc David Rientjes <[email protected]>

---

 fs/binfmt_elf.c |    4 ----
 1 file changed, 4 deletions(-)
fs/binfmt_elf.c renamed from fs/binfmt_elf.c~exec-kill-the-unnecessary-mm-def_flags-setting-in-load_elf_binary +0 -3
diff -puN fs/binfmt_elf.c~exec-kill-the-unnecessary-mm-def_flags-setting-in-load_elf_binary 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;