summaryrefslogtreecommitdiff
path: root/include/linux
diff options
context:
space:
mode:
authorEric W. Biederman <ebiederm@xmission.com>2021-11-22 19:27:36 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2024-04-10 17:18:55 +0300
commitdd6663096680b8cfb77b707b54fc8a04f85f1a2f (patch)
tree36ea504fb4c5fb4dfabf82277241e705cef4b622 /include/linux
parentde7e2adfc7847acd3925aa2c21009b410f9d4033 (diff)
downloadlinux-dd6663096680b8cfb77b707b54fc8a04f85f1a2f.tar.xz
exit: Implement kthread_exit
[ Upstream commit bbda86e988d4c124e4cfa816291cbd583ae8bfb1 ] The way the per task_struct exit_code is used by kernel threads is not quite compatible how it is used by userspace applications. The low byte of the userspace exit_code value encodes the exit signal. While kthreads just use the value as an int holding ordinary kernel function exit status like -EPERM. Add kthread_exit to clearly separate the two kinds of uses. Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com> Stable-dep-of: ca3574bd653a ("exit: Rename module_put_and_exit to module_put_and_kthread_exit") Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/kthread.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/include/linux/kthread.h b/include/linux/kthread.h
index db47aae7c481..8e21bd13c36d 100644
--- a/include/linux/kthread.h
+++ b/include/linux/kthread.h
@@ -95,6 +95,7 @@ void *kthread_probe_data(struct task_struct *k);
int kthread_park(struct task_struct *k);
void kthread_unpark(struct task_struct *k);
void kthread_parkme(void);
+void kthread_exit(long result) __noreturn;
int kthreadd(void *unused);
extern struct task_struct *kthreadd_task;