diff options
Diffstat (limited to 'fs/exec.c')
| -rw-r--r-- | fs/exec.c | 26 | 
1 files changed, 16 insertions, 10 deletions
| @@ -941,9 +941,7 @@ void set_task_comm(struct task_struct *tsk, char *buf) | |||
| 941 | 941 | ||
| 942 | int flush_old_exec(struct linux_binprm * bprm) | 942 | int flush_old_exec(struct linux_binprm * bprm) | 
| 943 | { | 943 | { | 
| 944 | char * name; | 944 | int retval; | 
| 945 | int i, ch, retval; | ||
| 946 | char tcomm[sizeof(current->comm)]; | ||
| 947 | 945 | ||
| 948 | /* | 946 | /* | 
| 949 | * Make sure we have a private signal table and that | 947 | * Make sure we have a private signal table and that | 
| @@ -963,6 +961,20 @@ int flush_old_exec(struct linux_binprm * bprm) | |||
| 963 | goto out; | 961 | goto out; | 
| 964 | 962 | ||
| 965 | bprm->mm = NULL; /* We're using it now */ | 963 | bprm->mm = NULL; /* We're using it now */ | 
| 964 | return 0; | ||
| 965 | |||
| 966 | out: | ||
| 967 | return retval; | ||
| 968 | } | ||
| 969 | EXPORT_SYMBOL(flush_old_exec); | ||
| 970 | |||
| 971 | void setup_new_exec(struct linux_binprm * bprm) | ||
| 972 | { | ||
| 973 | int i, ch; | ||
| 974 | char * name; | ||
| 975 | char tcomm[sizeof(current->comm)]; | ||
| 976 | |||
| 977 | arch_pick_mmap_layout(current->mm); | ||
| 966 | 978 | ||
| 967 | /* This is the point of no return */ | 979 | /* This is the point of no return */ | 
| 968 | current->sas_ss_sp = current->sas_ss_size = 0; | 980 | current->sas_ss_sp = current->sas_ss_size = 0; | 
| @@ -1019,14 +1031,8 @@ int flush_old_exec(struct linux_binprm * bprm) | |||
| 1019 | 1031 | ||
| 1020 | flush_signal_handlers(current, 0); | 1032 | flush_signal_handlers(current, 0); | 
| 1021 | flush_old_files(current->files); | 1033 | flush_old_files(current->files); | 
| 1022 | |||
| 1023 | return 0; | ||
| 1024 | |||
| 1025 | out: | ||
| 1026 | return retval; | ||
| 1027 | } | 1034 | } | 
| 1028 | 1035 | EXPORT_SYMBOL(setup_new_exec); | |
| 1029 | EXPORT_SYMBOL(flush_old_exec); | ||
| 1030 | 1036 | ||
| 1031 | /* | 1037 | /* | 
| 1032 | * Prepare credentials and lock ->cred_guard_mutex. | 1038 | * Prepare credentials and lock ->cred_guard_mutex. | 
