From: Alex Thorlton <athorlton@sgi.com>
To: linux-kernel@vger.kernel.org
Cc: Alex Thorlton <athorlton@sgi.com>,
Alexander Viro <viro@zeniv.linux.org.uk>,
Oleg Nesterov <oleg@redhat.com>,
linux-fsdevel@vger.kernel.org, linux-mm@kvack.org
Subject: [PATCH 3/3] exec: kill the unnecessary mm->def_flags setting in load_elf_binary()
Date: Fri, 31 Jan 2014 12:23:47 -0600 [thread overview]
Message-ID: <1391192628-113858-7-git-send-email-athorlton@sgi.com> (raw)
In-Reply-To: <1391192628-113858-1-git-send-email-athorlton@sgi.com>
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: Alexander Viro <viro@zeniv.linux.org.uk>
Cc: Oleg Nesterov <oleg@redhat.com>
Cc: linux-fsdevel@vger.kernel.org
Cc: linux-kernel@vger.kernel.org
Cc: linux-mm@kvack.org
---
fs/binfmt_elf.c | 4 ----
1 file changed, 4 deletions(-)
diff --git a/fs/binfmt_elf.c b/fs/binfmt_elf.c
index 67be295..d09bd9c 100644
--- a/fs/binfmt_elf.c
+++ b/fs/binfmt_elf.c
@@ -579,7 +579,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;
@@ -719,9 +718,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. */
SET_PERSONALITY(loc->elf_ex);
--
1.7.12.4
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
next prev parent reply other threads:[~2014-01-31 18:24 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-01-31 18:23 [PATCHv3 0/3] Add mm flag to control THP Alex Thorlton
2014-01-31 18:23 ` Alex Thorlton
2014-01-31 18:23 ` [PATCH 1/3] Revert "thp: make MADV_HUGEPAGE check for mm->def_flags" Alex Thorlton
2014-01-31 22:52 ` Andrew Morton
2014-02-03 13:53 ` Gerald Schaefer
2014-02-03 17:14 ` Alex Thorlton
2014-01-31 18:23 ` Alex Thorlton
2014-01-31 18:23 ` [PATCH 2/3] Add VM_INIT_DEF_MASK and PRCTL_THP_DISABLE Alex Thorlton
2014-01-31 23:00 ` Andrew Morton
2014-02-03 17:22 ` Alex Thorlton
2014-02-03 17:46 ` Oleg Nesterov
2014-01-31 18:23 ` Alex Thorlton
2014-01-31 18:23 ` Alex Thorlton [this message]
2014-01-31 18:23 ` [PATCH 3/3] exec: kill the unnecessary mm->def_flags setting in load_elf_binary() Alex Thorlton
2014-01-31 18:25 ` [PATCHv3 0/3] Add mm flag to control THP Alex Thorlton
2014-02-25 19:20 [PATCH 0/3] mm, thp: " Alex Thorlton
2014-02-25 19:21 ` [PATCH 3/3] exec: kill the unnecessary mm->def_flags setting in load_elf_binary() Alex Thorlton
2014-02-25 23:03 ` Rik van Riel
2014-02-25 20:54 [PATCHv4 0/3] [RESEND] mm, thp: Add mm flag to control THP Alex Thorlton
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1391192628-113858-7-git-send-email-athorlton@sgi.com \
--to=athorlton@sgi.com \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=oleg@redhat.com \
--cc=viro@zeniv.linux.org.uk \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox