aboutsummaryrefslogtreecommitdiffstats
path: root/fs/exec.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/exec.c')
-rw-r--r--fs/exec.c13
1 files changed, 9 insertions, 4 deletions
diff --git a/fs/exec.c b/fs/exec.c
index 1f8a24aa1f8b..9448f1b50b4a 100644
--- a/fs/exec.c
+++ b/fs/exec.c
@@ -860,6 +860,7 @@ static int de_thread(struct task_struct *tsk)
860 860
861no_thread_group: 861no_thread_group:
862 exit_itimers(sig); 862 exit_itimers(sig);
863 flush_itimer_signals();
863 if (leader) 864 if (leader)
864 release_task(leader); 865 release_task(leader);
865 866
@@ -1251,6 +1252,12 @@ int search_binary_handler(struct linux_binprm *bprm,struct pt_regs *regs)
1251 1252
1252EXPORT_SYMBOL(search_binary_handler); 1253EXPORT_SYMBOL(search_binary_handler);
1253 1254
1255void free_bprm(struct linux_binprm *bprm)
1256{
1257 free_arg_pages(bprm);
1258 kfree(bprm);
1259}
1260
1254/* 1261/*
1255 * sys_execve() executes a new program. 1262 * sys_execve() executes a new program.
1256 */ 1263 */
@@ -1320,17 +1327,15 @@ int do_execve(char * filename,
1320 retval = search_binary_handler(bprm,regs); 1327 retval = search_binary_handler(bprm,regs);
1321 if (retval >= 0) { 1328 if (retval >= 0) {
1322 /* execve success */ 1329 /* execve success */
1323 free_arg_pages(bprm);
1324 security_bprm_free(bprm); 1330 security_bprm_free(bprm);
1325 acct_update_integrals(current); 1331 acct_update_integrals(current);
1326 kfree(bprm); 1332 free_bprm(bprm);
1327 if (displaced) 1333 if (displaced)
1328 put_files_struct(displaced); 1334 put_files_struct(displaced);
1329 return retval; 1335 return retval;
1330 } 1336 }
1331 1337
1332out: 1338out:
1333 free_arg_pages(bprm);
1334 if (bprm->security) 1339 if (bprm->security)
1335 security_bprm_free(bprm); 1340 security_bprm_free(bprm);
1336 1341
@@ -1344,7 +1349,7 @@ out_file:
1344 fput(bprm->file); 1349 fput(bprm->file);
1345 } 1350 }
1346out_kfree: 1351out_kfree:
1347 kfree(bprm); 1352 free_bprm(bprm);
1348 1353
1349out_files: 1354out_files:
1350 if (displaced) 1355 if (displaced)