X-Git-Url: https://git.karo-electronics.de/?a=blobdiff_plain;f=fs%2Fexec.c;h=e639957d7a57a310c12718e8fe3e4f0d9dfe2fe2;hb=9937ac0cc087b03d6d73f46a5d6b38c43626e60e;hp=a7fcd975c6b264d534f63f7958cc8918027010ae;hpb=73fbad283cfbbcf02939bdbda31fc4a30e729cca;p=mv-sheeva.git diff --git a/fs/exec.c b/fs/exec.c index a7fcd975c6b..e639957d7a5 100644 --- a/fs/exec.c +++ b/fs/exec.c @@ -33,6 +33,7 @@ #include #include #include +#include #include #include #include @@ -922,6 +923,7 @@ void set_task_comm(struct task_struct *tsk, char *buf) task_lock(tsk); strlcpy(tsk->comm, buf, sizeof(tsk->comm)); task_unlock(tsk); + perf_counter_comm(tsk); } int flush_old_exec(struct linux_binprm * bprm) @@ -990,6 +992,13 @@ int flush_old_exec(struct linux_binprm * bprm) current->personality &= ~bprm->per_clear; + /* + * Flush performance counters when crossing a + * security domain: + */ + if (!get_dumpable(current->mm)) + perf_counter_exit_task(current); + /* An exec changes our domain. We are no longer part of the thread group */