diff options
| -rw-r--r-- | fs/exec.c | 10 |
1 files changed, 5 insertions, 5 deletions
| @@ -961,6 +961,11 @@ int flush_old_exec(struct linux_binprm * bprm) | |||
| 961 | goto out; | 961 | goto out; |
| 962 | 962 | ||
| 963 | bprm->mm = NULL; /* We're using it now */ | 963 | bprm->mm = NULL; /* We're using it now */ |
| 964 | |||
| 965 | current->flags &= ~PF_RANDOMIZE; | ||
| 966 | flush_thread(); | ||
| 967 | current->personality &= ~bprm->per_clear; | ||
| 968 | |||
| 964 | return 0; | 969 | return 0; |
| 965 | 970 | ||
| 966 | out: | 971 | out: |
| @@ -997,9 +1002,6 @@ void setup_new_exec(struct linux_binprm * bprm) | |||
| 997 | tcomm[i] = '\0'; | 1002 | tcomm[i] = '\0'; |
| 998 | set_task_comm(current, tcomm); | 1003 | set_task_comm(current, tcomm); |
| 999 | 1004 | ||
| 1000 | current->flags &= ~PF_RANDOMIZE; | ||
| 1001 | flush_thread(); | ||
| 1002 | |||
| 1003 | /* Set the new mm task size. We have to do that late because it may | 1005 | /* Set the new mm task size. We have to do that late because it may |
| 1004 | * depend on TIF_32BIT which is only updated in flush_thread() on | 1006 | * depend on TIF_32BIT which is only updated in flush_thread() on |
| 1005 | * some architectures like powerpc | 1007 | * some architectures like powerpc |
| @@ -1015,8 +1017,6 @@ void setup_new_exec(struct linux_binprm * bprm) | |||
| 1015 | set_dumpable(current->mm, suid_dumpable); | 1017 | set_dumpable(current->mm, suid_dumpable); |
| 1016 | } | 1018 | } |
| 1017 | 1019 | ||
| 1018 | current->personality &= ~bprm->per_clear; | ||
| 1019 | |||
| 1020 | /* | 1020 | /* |
| 1021 | * Flush performance counters when crossing a | 1021 | * Flush performance counters when crossing a |
| 1022 | * security domain: | 1022 | * security domain: |
