summaryrefslogtreecommitdiff
path: root/arch/powerpc/include/asm/vga.h
diff options
context:
space:
mode:
authorNicholas Piggin <npiggin@gmail.com>2023-03-25 15:29:01 +0300
committerMichael Ellerman <mpe@ellerman.id.au>2023-04-11 16:13:33 +0300
commiteed7c420aac7fde5e5915d2747c3ebbbda225835 (patch)
tree8e29bf90b55ef02b7a06dcad15135363210ae863 /arch/powerpc/include/asm/vga.h
parent5088a6246bd3dcfea504376f356683f750136f7f (diff)
downloadlinux-eed7c420aac7fde5e5915d2747c3ebbbda225835.tar.xz
powerpc: copy_thread differentiate kthreads and user mode threads
When copy_thread is given a kernel function to run in arg->fn, this does not necessarily mean it is a kernel thread. User threads can be created this way (e.g., kernel_init, see also x86's copy_thread()). These threads run a kernel function which may call kernel_execve() and return, which returns like a userspace exec(2) syscall. Kernel threads are to be differentiated with PF_KTHREAD, will always have arg->fn set, and should never return from that function, instead calling kthread_exit() to exit. Create separate paths for the kthread and user kernel thread creation logic. The kthread path will never exit and does not require a user interrupt frame, so it gets a minimal stack frame. Signed-off-by: Nicholas Piggin <npiggin@gmail.com> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au> Link: https://msgid.link/20230325122904.2375060-6-npiggin@gmail.com
Diffstat (limited to 'arch/powerpc/include/asm/vga.h')
0 files changed, 0 insertions, 0 deletions