aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--fs/exec.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/fs/exec.c b/fs/exec.c
index 7619dddd5622..396aec2dae90 100644
--- a/fs/exec.c
+++ b/fs/exec.c
@@ -1464,7 +1464,6 @@ static int do_execve_common(const char *filename,
1464 struct files_struct *displaced; 1464 struct files_struct *displaced;
1465 bool clear_in_exec; 1465 bool clear_in_exec;
1466 int retval; 1466 int retval;
1467 const struct cred *cred = current_cred();
1468 1467
1469 /* 1468 /*
1470 * We move the actual failure in case of RLIMIT_NPROC excess from 1469 * We move the actual failure in case of RLIMIT_NPROC excess from
@@ -1473,7 +1472,7 @@ static int do_execve_common(const char *filename,
1473 * whether NPROC limit is still exceeded. 1472 * whether NPROC limit is still exceeded.
1474 */ 1473 */
1475 if ((current->flags & PF_NPROC_EXCEEDED) && 1474 if ((current->flags & PF_NPROC_EXCEEDED) &&
1476 atomic_read(&cred->user->processes) > rlimit(RLIMIT_NPROC)) { 1475 atomic_read(&current_user()->processes) > rlimit(RLIMIT_NPROC)) {
1477 retval = -EAGAIN; 1476 retval = -EAGAIN;
1478 goto out_ret; 1477 goto out_ret;
1479 } 1478 }