diff options
Diffstat (limited to 'fs/exec.c')
-rw-r--r-- | fs/exec.c | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -1046,13 +1046,13 @@ EXPORT_SYMBOL_GPL(get_task_comm); | |||
1046 | * so that a new one can be started | 1046 | * so that a new one can be started |
1047 | */ | 1047 | */ |
1048 | 1048 | ||
1049 | void set_task_comm(struct task_struct *tsk, const char *buf) | 1049 | void __set_task_comm(struct task_struct *tsk, const char *buf, bool exec) |
1050 | { | 1050 | { |
1051 | task_lock(tsk); | 1051 | task_lock(tsk); |
1052 | trace_task_rename(tsk, buf); | 1052 | trace_task_rename(tsk, buf); |
1053 | strlcpy(tsk->comm, buf, sizeof(tsk->comm)); | 1053 | strlcpy(tsk->comm, buf, sizeof(tsk->comm)); |
1054 | task_unlock(tsk); | 1054 | task_unlock(tsk); |
1055 | perf_event_comm(tsk); | 1055 | perf_event_comm(tsk, exec); |
1056 | } | 1056 | } |
1057 | 1057 | ||
1058 | int flush_old_exec(struct linux_binprm * bprm) | 1058 | int flush_old_exec(struct linux_binprm * bprm) |
@@ -1111,7 +1111,7 @@ void setup_new_exec(struct linux_binprm * bprm) | |||
1111 | set_dumpable(current->mm, suid_dumpable); | 1111 | set_dumpable(current->mm, suid_dumpable); |
1112 | 1112 | ||
1113 | perf_event_exec(); | 1113 | perf_event_exec(); |
1114 | set_task_comm(current, kbasename(bprm->filename)); | 1114 | __set_task_comm(current, kbasename(bprm->filename), true); |
1115 | 1115 | ||
1116 | /* Set the new mm task size. We have to do that late because it may | 1116 | /* Set the new mm task size. We have to do that late because it may |
1117 | * depend on TIF_32BIT which is only updated in flush_thread() on | 1117 | * depend on TIF_32BIT which is only updated in flush_thread() on |