John Baldwin
fb1f4582ff
Call kthread_exit() rather than kproc_exit() for a premature kthread exit.
...
Kernel threads (and processes) are supposed to call kthread_exit() (or
kproc_exit()) to terminate. However, the kernel includes a fallback in
fork_exit() to force a kthread exit if a kernel thread's "main" routine
returns. This fallback was added back when the kernel only had processes
and was not updated to call kthread_exit() instead of kproc_exit() when
threads were added to the kernel.
This mistake was particular exciting when the errant thread belonged to
proc0. Due to the missing P_KTHREAD flag the fallback did not kick in
and instead tried to return to userland via whatever garbage was in the
trapframe. With P_KTHREAD set it tried to terminate proc0 resulting in
other amusements.
PR: 204999
MFC after: 1 week
2016-02-08 23:11:23 +00:00
..
2016-01-27 02:23:54 +00:00
2015-08-14 22:57:13 +00:00
2016-01-09 20:18:53 +00:00
2015-06-24 15:52:26 +00:00
2016-02-04 20:55:49 +00:00
2016-02-08 23:06:27 +00:00
2015-10-22 21:30:39 +00:00
2015-07-20 09:37:42 +00:00
2016-01-09 01:56:46 +00:00
2016-01-07 20:08:02 +00:00
2015-06-26 04:14:05 +00:00
2015-11-07 00:18:14 +00:00
2015-11-16 23:02:33 +00:00
2016-01-02 02:53:48 +00:00
2016-01-28 20:24:15 +00:00
2015-12-16 23:39:27 +00:00
2016-01-20 23:33:58 +00:00
2016-02-08 23:11:23 +00:00
2015-11-25 07:14:58 +00:00
2015-07-21 14:39:34 +00:00
2015-12-15 17:25:00 +00:00
2016-02-04 04:22:18 +00:00
2016-01-31 17:32:20 +00:00
2016-01-27 19:55:02 +00:00
2015-12-11 05:27:53 +00:00
2015-08-02 00:03:08 +00:00
2015-07-19 22:24:33 +00:00
2015-11-15 12:10:51 +00:00
2016-02-03 23:30:17 +00:00
2016-02-03 23:30:17 +00:00
2015-11-12 22:00:59 +00:00
2015-10-10 09:21:55 +00:00
2015-08-02 00:03:08 +00:00
2015-07-12 18:38:17 +00:00
2015-07-11 15:21:37 +00:00
2015-10-29 13:53:37 +00:00
2016-02-08 10:54:27 +00:00
2015-08-20 22:44:26 +00:00
2016-01-14 10:16:25 +00:00
2016-02-04 04:25:30 +00:00
2016-01-26 11:28:55 +00:00
2015-12-22 21:07:33 +00:00
2015-09-15 22:16:21 +00:00
2015-08-02 00:03:08 +00:00
2016-01-22 02:23:18 +00:00
2015-11-23 07:09:35 +00:00
2015-10-01 10:52:26 +00:00
2015-12-29 23:25:26 +00:00
2015-08-02 00:03:08 +00:00
2016-01-26 01:15:18 +00:00
2015-11-02 03:14:37 +00:00
2015-12-29 23:25:26 +00:00
2015-12-29 23:16:20 +00:00
2015-12-27 15:37:07 +00:00
2015-12-16 23:39:27 +00:00
2015-10-30 20:47:42 +00:00
2015-08-30 18:02:57 +00:00
2015-09-20 01:27:59 +00:00
2015-12-23 03:34:43 +00:00
2015-10-27 22:59:24 +00:00
2015-10-22 21:28:20 +00:00
2015-12-18 05:43:59 +00:00
2015-08-03 20:43:36 +00:00
2015-08-26 16:36:41 +00:00
2015-09-04 00:14:20 +00:00
2016-01-11 20:38:39 +00:00
2016-01-27 02:23:54 +00:00
2015-10-20 03:25:17 +00:00
2015-12-01 02:48:42 +00:00
2015-07-11 16:22:48 +00:00
2015-12-18 05:43:59 +00:00
2016-02-01 17:41:21 +00:00
2015-08-21 15:57:57 +00:00
2015-09-21 15:02:59 +00:00
2015-11-19 05:50:22 +00:00
2016-01-27 02:23:54 +00:00
2015-10-02 09:23:14 +00:00
2015-11-08 14:26:50 +00:00
2015-11-19 05:56:59 +00:00
2015-12-17 00:00:27 +00:00
2015-11-13 22:51:35 +00:00
2015-07-13 22:52:11 +00:00
2015-12-03 20:54:55 +00:00
2015-11-23 18:45:35 +00:00
2015-08-11 08:43:50 +00:00
2015-07-09 09:22:21 +00:00
2015-07-29 17:18:27 +00:00
2015-07-18 09:02:50 +00:00
2015-12-29 23:25:26 +00:00
2015-10-22 21:30:39 +00:00
2015-07-11 15:22:11 +00:00
2015-07-11 15:22:11 +00:00
2016-02-07 22:12:39 +00:00
2015-10-10 09:29:47 +00:00
2015-07-06 18:53:56 +00:00
2016-01-26 14:46:39 +00:00
2016-01-26 14:46:39 +00:00
2016-02-02 05:57:59 +00:00
2015-08-08 15:50:46 +00:00
2016-01-08 20:34:57 +00:00
2015-07-23 23:18:03 +00:00
2015-12-16 21:30:45 +00:00
2016-02-01 17:41:21 +00:00
2016-02-02 05:57:59 +00:00
2016-01-22 02:23:18 +00:00
2016-01-08 19:03:20 +00:00
2016-02-05 20:38:09 +00:00
2016-02-07 16:18:12 +00:00
2016-01-21 01:09:39 +00:00
2016-01-27 21:23:01 +00:00
2016-01-05 14:48:40 +00:00
2016-01-25 06:33:15 +00:00
2015-09-06 05:50:51 +00:00
2015-09-15 23:06:56 +00:00
2015-09-28 12:14:16 +00:00
2016-02-04 16:32:21 +00:00
2015-10-30 15:52:10 +00:00
2016-01-18 22:21:46 +00:00
2016-02-07 01:04:47 +00:00
2016-01-22 20:35:20 +00:00
2015-12-16 21:30:45 +00:00