]> git.proxmox.com Git - mirror_ubuntu-jammy-kernel.git/blobdiff - fs/exec.c
kernel: Implement selective syscall userspace redirection
[mirror_ubuntu-jammy-kernel.git] / fs / exec.c
index 547a2390baf54f4e285fb41d3488025f1954aed9..aee36e5733ce4aee7202759a0d0279f93ba7f0b4 100644 (file)
--- a/fs/exec.c
+++ b/fs/exec.c
@@ -64,6 +64,7 @@
 #include <linux/compat.h>
 #include <linux/vmalloc.h>
 #include <linux/io_uring.h>
+#include <linux/syscall_user_dispatch.h>
 
 #include <linux/uaccess.h>
 #include <asm/mmu_context.h>
@@ -1302,6 +1303,8 @@ int begin_new_exec(struct linux_binprm * bprm)
        flush_thread();
        me->personality &= ~bprm->per_clear;
 
+       clear_syscall_work_syscall_user_dispatch(me);
+
        /*
         * We have to apply CLOEXEC before we change whether the process is
         * dumpable (in setup_new_exec) to avoid a race with a process in userspace