aboutsummaryrefslogtreecommitdiffstats
path: root/fs/exec.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/exec.c')
-rw-r--r--fs/exec.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/fs/exec.c b/fs/exec.c
index a3a8ce83940f..fe75dcff023a 100644
--- a/fs/exec.c
+++ b/fs/exec.c
@@ -33,6 +33,7 @@
33#include <linux/string.h> 33#include <linux/string.h>
34#include <linux/init.h> 34#include <linux/init.h>
35#include <linux/pagemap.h> 35#include <linux/pagemap.h>
36#include <linux/perf_counter.h>
36#include <linux/highmem.h> 37#include <linux/highmem.h>
37#include <linux/spinlock.h> 38#include <linux/spinlock.h>
38#include <linux/key.h> 39#include <linux/key.h>
@@ -950,6 +951,7 @@ void set_task_comm(struct task_struct *tsk, char *buf)
950 task_lock(tsk); 951 task_lock(tsk);
951 strlcpy(tsk->comm, buf, sizeof(tsk->comm)); 952 strlcpy(tsk->comm, buf, sizeof(tsk->comm));
952 task_unlock(tsk); 953 task_unlock(tsk);
954 perf_counter_comm(tsk);
953} 955}
954 956
955int flush_old_exec(struct linux_binprm * bprm) 957int flush_old_exec(struct linux_binprm * bprm)
@@ -1018,6 +1020,13 @@ int flush_old_exec(struct linux_binprm * bprm)
1018 1020
1019 current->personality &= ~bprm->per_clear; 1021 current->personality &= ~bprm->per_clear;
1020 1022
1023 /*
1024 * Flush performance counters when crossing a
1025 * security domain:
1026 */
1027 if (!get_dumpable(current->mm))
1028 perf_counter_exit_task(current);
1029
1021 /* An exec changes our domain. We are no longer part of the thread 1030 /* An exec changes our domain. We are no longer part of the thread
1022 group */ 1031 group */
1023 1032