diff options
Diffstat (limited to 'fs/exec.c')
-rw-r--r-- | fs/exec.c | 3 |
1 files changed, 3 insertions, 0 deletions
@@ -1278,6 +1278,7 @@ int do_execve(char * filename, | |||
1278 | retval = mutex_lock_interruptible(¤t->cred_exec_mutex); | 1278 | retval = mutex_lock_interruptible(¤t->cred_exec_mutex); |
1279 | if (retval < 0) | 1279 | if (retval < 0) |
1280 | goto out_free; | 1280 | goto out_free; |
1281 | current->in_execve = 1; | ||
1281 | 1282 | ||
1282 | retval = -ENOMEM; | 1283 | retval = -ENOMEM; |
1283 | bprm->cred = prepare_exec_creds(); | 1284 | bprm->cred = prepare_exec_creds(); |
@@ -1331,6 +1332,7 @@ int do_execve(char * filename, | |||
1331 | goto out; | 1332 | goto out; |
1332 | 1333 | ||
1333 | /* execve succeeded */ | 1334 | /* execve succeeded */ |
1335 | current->in_execve = 0; | ||
1334 | mutex_unlock(¤t->cred_exec_mutex); | 1336 | mutex_unlock(¤t->cred_exec_mutex); |
1335 | acct_update_integrals(current); | 1337 | acct_update_integrals(current); |
1336 | free_bprm(bprm); | 1338 | free_bprm(bprm); |
@@ -1349,6 +1351,7 @@ out_file: | |||
1349 | } | 1351 | } |
1350 | 1352 | ||
1351 | out_unlock: | 1353 | out_unlock: |
1354 | current->in_execve = 0; | ||
1352 | mutex_unlock(¤t->cred_exec_mutex); | 1355 | mutex_unlock(¤t->cred_exec_mutex); |
1353 | 1356 | ||
1354 | out_free: | 1357 | out_free: |