1 diff --git a/fs/exec.c b/fs/exec.c
2 index 9a5ca7b82bfc..fe786aeb2f1b 100644
5 @@ -1881,6 +1881,16 @@ static int do_execveat_common(int fd, struct filename *filename,
7 return PTR_ERR(filename);
9 + /* Fast-path ENOENT for $PATH search failures, before we alloc an mm or
10 + * parse arguments. */
11 + if (fd == AT_FDCWD && flags == 0 && filename->name[0] == '/') {
13 + retval = filename_lookup(AT_FDCWD, filename, 0, &path, NULL);
14 + if (retval == -ENOENT)
20 * We move the actual failure in case of RLIMIT_NPROC excess from
21 * set*uid() to execve() because too many poorly written programs