diff options
author | Eric W. Biederman <ebiederm@xmission.com> | 2022-04-09 01:07:50 +0200 |
---|---|---|
committer | Eric W. Biederman <ebiederm@xmission.com> | 2022-05-07 16:01:48 +0200 |
commit | c5febea0956fd3874e8fb59c6f84d68f128d68f8 (patch) | |
tree | 1fd7c1fa7491beff47fd863dfc89581cd726fc69 /arch/sh | |
parent | kthread: Don't allocate kthread_struct for init and umh (diff) | |
download | linux-c5febea0956fd3874e8fb59c6f84d68f128d68f8.tar.xz linux-c5febea0956fd3874e8fb59c6f84d68f128d68f8.zip |
fork: Pass struct kernel_clone_args into copy_thread
With io_uring we have started supporting tasks that are for most
purposes user space tasks that exclusively run code in kernel mode.
The kernel task that exec's init and tasks that exec user mode
helpers are also user mode tasks that just run kernel code
until they call kernel execve.
Pass kernel_clone_args into copy_thread so these oddball
tasks can be supported more cleanly and easily.
v2: Fix spelling of kenrel_clone_args on h8300
Link: https://lkml.kernel.org/r/20220506141512.516114-2-ebiederm@xmission.com
Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com>
Diffstat (limited to 'arch/sh')
-rw-r--r-- | arch/sh/kernel/process_32.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/arch/sh/kernel/process_32.c b/arch/sh/kernel/process_32.c index ca01286a0610..6023399b1892 100644 --- a/arch/sh/kernel/process_32.c +++ b/arch/sh/kernel/process_32.c @@ -92,9 +92,12 @@ void release_thread(struct task_struct *dead_task) asmlinkage void ret_from_fork(void); asmlinkage void ret_from_kernel_thread(void); -int copy_thread(unsigned long clone_flags, unsigned long usp, unsigned long arg, - struct task_struct *p, unsigned long tls) +int copy_thread(struct task_struct *p, const struct kernel_clone_args *args) { + unsigned long clone_flags = args->flags; + unsigned long usp = args->stack; + unsigned long arg = args->stack_size; + unsigned long tls = args->tls; struct thread_info *ti = task_thread_info(p); struct pt_regs *childregs; |