]> git.baikalelectronics.ru Git - kernel.git/commit
exit: Implement kthread_exit
authorEric W. Biederman <ebiederm@xmission.com>
Mon, 22 Nov 2021 16:27:36 +0000 (10:27 -0600)
committerEric W. Biederman <ebiederm@xmission.com>
Mon, 13 Dec 2021 18:04:45 +0000 (12:04 -0600)
commit9e7df96267746d94d4e1496d4beb9edd836cc673
treeb0d36a233c14df7e3a76cf608a3a956ac58b90a7
parent61979b89f265f328e8d8adf9b3496d4d243b9962
exit: Implement kthread_exit

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>
include/linux/kthread.h
kernel/kthread.c
tools/objtool/check.c