* mark python sqlite DEP opt and update .cache
[t2sde.git] / package / kernel / linux / latest-fast-path-exec.patch
blob42db645f50a2999cacdb32f6a5faf307c817b0dd
1 diff --git a/fs/exec.c b/fs/exec.c
2 index 9a5ca7b82bfc..fe786aeb2f1b 100644
3 --- a/fs/exec.c
4 +++ b/fs/exec.c
5 @@ -1881,6 +1881,16 @@ static int do_execveat_common(int fd, struct filename *filename,
6 if (IS_ERR(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] == '/') {
12 + struct path path;
13 + retval = filename_lookup(AT_FDCWD, filename, 0, &path, NULL);
14 + if (retval == -ENOENT)
15 + goto out_ret;
16 + path_put(&path);
17 + }
20 * We move the actual failure in case of RLIMIT_NPROC excess from
21 * set*uid() to execve() because too many poorly written programs