aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/include/linux/binfmts.h
diff options
context:
space:
mode:
authorOleg Nesterov <oleg@redhat.com>2014-04-07 15:38:39 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2014-04-07 16:36:05 -0700
commit23aebe1691a3d98a79676db6c0fd813e16478804 (patch)
treebd64954577711239c9a4fe43436f449a529eabcb /include/linux/binfmts.h
parentprocfs: make /proc/*/pagemap 0400 (diff)
downloadwireguard-linux-23aebe1691a3d98a79676db6c0fd813e16478804.tar.xz
wireguard-linux-23aebe1691a3d98a79676db6c0fd813e16478804.zip
exec: kill bprm->tcomm[], simplify the "basename" logic
Starting from commit c4ad8f98bef7 ("execve: use 'struct filename *' for executable name passing") bprm->filename can not go away after flush_old_exec(), so we do not need to save the binary name in bprm->tcomm[] added by 96e02d158678 ("exec: fix use-after-free bug in setup_new_exec()"). And there was never need for filename_to_taskname-like code, we can simply do set_task_comm(kbasename(filename). This patch has to change set_task_comm() and trace_task_rename() to accept "const char *", but I think this change is also good. Signed-off-by: Oleg Nesterov <oleg@redhat.com> Cc: Heiko Carstens <heiko.carstens@de.ibm.com> Cc: Steven Rostedt <rostedt@goodmis.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'include/linux/binfmts.h')
-rw-r--r--include/linux/binfmts.h1
1 files changed, 0 insertions, 1 deletions
diff --git a/include/linux/binfmts.h b/include/linux/binfmts.h
index b4a745d7d9a9..61f29e5ea840 100644
--- a/include/linux/binfmts.h
+++ b/include/linux/binfmts.h
@@ -44,7 +44,6 @@ struct linux_binprm {
unsigned interp_flags;
unsigned interp_data;
unsigned long loader, exec;
- char tcomm[TASK_COMM_LEN];
};
#define BINPRM_FLAGS_ENFORCE_NONDUMP_BIT 0