aboutsummaryrefslogtreecommitdiffstats
path: root/fs/compat.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/compat.c')
-rw-r--r--fs/compat.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/fs/compat.c b/fs/compat.c
index d0145ca27572..0949b43794a4 100644
--- a/fs/compat.c
+++ b/fs/compat.c
@@ -1402,6 +1402,7 @@ int compat_do_execve(char * filename,
1402 retval = mutex_lock_interruptible(&current->cred_exec_mutex); 1402 retval = mutex_lock_interruptible(&current->cred_exec_mutex);
1403 if (retval < 0) 1403 if (retval < 0)
1404 goto out_free; 1404 goto out_free;
1405 current->in_execve = 1;
1405 1406
1406 retval = -ENOMEM; 1407 retval = -ENOMEM;
1407 bprm->cred = prepare_exec_creds(); 1408 bprm->cred = prepare_exec_creds();
@@ -1454,6 +1455,7 @@ int compat_do_execve(char * filename,
1454 goto out; 1455 goto out;
1455 1456
1456 /* execve succeeded */ 1457 /* execve succeeded */
1458 current->in_execve = 0;
1457 mutex_unlock(&current->cred_exec_mutex); 1459 mutex_unlock(&current->cred_exec_mutex);
1458 acct_update_integrals(current); 1460 acct_update_integrals(current);
1459 free_bprm(bprm); 1461 free_bprm(bprm);
@@ -1470,6 +1472,7 @@ out_file:
1470 } 1472 }
1471 1473
1472out_unlock: 1474out_unlock:
1475 current->in_execve = 0;
1473 mutex_unlock(&current->cred_exec_mutex); 1476 mutex_unlock(&current->cred_exec_mutex);
1474 1477
1475out_free: 1478out_free: