|
@@ -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)
|
|
@@ -1111,7 +1111,7 @@ void setup_new_exec(struct linux_binprm * bprm)
|
|
|
set_dumpable(current->mm, suid_dumpable);
|
|
|
|
|
|
perf_event_exec();
|
|
|
- set_task_comm(current, kbasename(bprm->filename));
|
|
|
+ __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
|