diff options
Diffstat (limited to 'fs/compat.c')
-rw-r--r-- | fs/compat.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/fs/compat.c b/fs/compat.c index 4e0db94b5353..5e374aad33f7 100644 --- a/fs/compat.c +++ b/fs/compat.c | |||
@@ -1430,6 +1430,7 @@ int compat_do_execve(char * filename, | |||
1430 | retval = mutex_lock_interruptible(¤t->cred_exec_mutex); | 1430 | retval = mutex_lock_interruptible(¤t->cred_exec_mutex); |
1431 | if (retval < 0) | 1431 | if (retval < 0) |
1432 | goto out_free; | 1432 | goto out_free; |
1433 | current->in_execve = 1; | ||
1433 | 1434 | ||
1434 | retval = -ENOMEM; | 1435 | retval = -ENOMEM; |
1435 | bprm->cred = prepare_exec_creds(); | 1436 | bprm->cred = prepare_exec_creds(); |
@@ -1482,6 +1483,7 @@ int compat_do_execve(char * filename, | |||
1482 | goto out; | 1483 | goto out; |
1483 | 1484 | ||
1484 | /* execve succeeded */ | 1485 | /* execve succeeded */ |
1486 | current->in_execve = 0; | ||
1485 | mutex_unlock(¤t->cred_exec_mutex); | 1487 | mutex_unlock(¤t->cred_exec_mutex); |
1486 | acct_update_integrals(current); | 1488 | acct_update_integrals(current); |
1487 | free_bprm(bprm); | 1489 | free_bprm(bprm); |
@@ -1498,6 +1500,7 @@ out_file: | |||
1498 | } | 1500 | } |
1499 | 1501 | ||
1500 | out_unlock: | 1502 | out_unlock: |
1503 | current->in_execve = 0; | ||
1501 | mutex_unlock(¤t->cred_exec_mutex); | 1504 | mutex_unlock(¤t->cred_exec_mutex); |
1502 | 1505 | ||
1503 | out_free: | 1506 | out_free: |