mirror of
https://github.com/lkl/linux.git
synced 2025-12-19 16:13:19 +09:00
exec: kill bprm->tcomm[], simplify the "basename" logic
Starting from commitc4ad8f98be("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 by96e02d1586("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>
This commit is contained in:
committed by
Linus Torvalds
parent
32ed74a4b9
commit
23aebe1691
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user