X-Git-Url: https://git.karo-electronics.de/?a=blobdiff_plain;f=fs%2Fexec.c;h=a3d33fe592d6d95619506b6f4aac33621284d3f8;hb=refs%2Fheads%2Ftx6s-glyn;hp=238b7aa26f68ab538df0cc219073a3d26541cc11;hpb=de815a6d00da0f8a59e8aebf8efe12e289552a8f;p=karo-tx-linux.git diff --git a/fs/exec.c b/fs/exec.c index 238b7aa26f68..a3d33fe592d6 100644 --- a/fs/exec.c +++ b/fs/exec.c @@ -1046,13 +1046,13 @@ EXPORT_SYMBOL_GPL(get_task_comm); * so that a new one can be started */ -void set_task_comm(struct task_struct *tsk, const char *buf) +void __set_task_comm(struct task_struct *tsk, const char *buf, bool exec) { task_lock(tsk); trace_task_rename(tsk, buf); strlcpy(tsk->comm, buf, sizeof(tsk->comm)); task_unlock(tsk); - perf_event_comm(tsk); + perf_event_comm(tsk, exec); } int flush_old_exec(struct linux_binprm * bprm) @@ -1110,7 +1110,8 @@ void setup_new_exec(struct linux_binprm * bprm) else set_dumpable(current->mm, suid_dumpable); - set_task_comm(current, kbasename(bprm->filename)); + perf_event_exec(); + __set_task_comm(current, kbasename(bprm->filename), true); /* Set the new mm task size. We have to do that late because it may * depend on TIF_32BIT which is only updated in flush_thread() on