More a comment on the previous patch, but I think exporting do_exit which can work on any task is a really bad idea. I'd much rather re-add a kthread_exit wrapper that checks PF_KTHREAD first and only export that, which would obsolete this patch.
- [PATCH] kthread: remove kthread_exit() Christian Brauner
- Re: [PATCH] kthread: remove kthread_exit() Christoph Hellwig
- Re: [PATCH] kthread: remove kthread_exit() Linus Torvalds

