diff --git a/[refs] b/[refs] index c505634fce0b..c6cd8d42d8fc 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 0cc0c027d4e028632933f1be2dc4cd730358183b +refs/heads/master: f65cb45cba63f249458b669aa67069eabc37b2f5 diff --git a/trunk/fs/exec.c b/trunk/fs/exec.c index ec5df9a38313..d5165d899a49 100644 --- a/trunk/fs/exec.c +++ b/trunk/fs/exec.c @@ -33,6 +33,7 @@ #include #include #include +#include #include #include #include @@ -1017,6 +1018,13 @@ int flush_old_exec(struct linux_binprm * bprm) set_dumpable(current->mm, suid_dumpable); } + /* + * 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 */