diff options
Diffstat (limited to 'fs/exec.c')
-rw-r--r-- | fs/exec.c | 8 |
1 files changed, 8 insertions, 0 deletions
@@ -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> |
@@ -1010,6 +1011,13 @@ int flush_old_exec(struct linux_binprm * bprm) | |||
1010 | 1011 | ||
1011 | current->personality &= ~bprm->per_clear; | 1012 | current->personality &= ~bprm->per_clear; |
1012 | 1013 | ||
1014 | /* | ||
1015 | * Flush performance counters when crossing a | ||
1016 | * security domain: | ||
1017 | */ | ||
1018 | if (!get_dumpable(current->mm)) | ||
1019 | perf_counter_exit_task(current); | ||
1020 | |||
1013 | /* An exec changes our domain. We are no longer part of the thread | 1021 | /* An exec changes our domain. We are no longer part of the thread |
1014 | group */ | 1022 | group */ |
1015 | 1023 | ||