aboutsummaryrefslogtreecommitdiffstats
path: root/fs
diff options
context:
space:
mode:
Diffstat (limited to 'fs')
-rw-r--r--fs/exec.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/fs/exec.c b/fs/exec.c
index 1f59ea079cbb..911dd0fd7e09 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>
@@ -1019,6 +1020,13 @@ int flush_old_exec(struct linux_binprm * bprm)
1019 1020
1020 current->personality &= ~bprm->per_clear; 1021 current->personality &= ~bprm->per_clear;
1021 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
1022 /* 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
1023 group */ 1031 group */
1024 1032