Brian Gianforcaro
6830963321
Kernel: Validate we don't hold s_mm_lock during context switch
...
Since `s_mm_lock` is a RecursiveSpinlock, if a kernel thread gets
preempted while accidentally hold the lock during switch_context,
another thread running on the same processor could end up manipulating
the state of the memory manager even though they should not be able to.
It will just bump the recursion count and keep going.
This appears to be the root cause of weird bugs like: #7359
Where page protection magically appears to be wrong during execution.
To avoid these cases lets guard this specific unfortunate case and make
sure it can never go unnoticed ever again.
The assert was Tom's idea to help debug this, so I am going to tag him
as co-author of this commit.
Co-Authored-By: Tom <tomut@yahoo.com >
2021-05-25 10:35:41 +02:00
..
2021-05-08 19:15:54 +02:00
2021-05-19 21:33:29 +02:00
2021-05-21 22:38:26 +01:00
2021-05-21 08:08:33 +02:00
2021-05-22 00:12:32 +02:00
2021-05-21 17:58:53 +01:00
2021-05-19 22:51:42 +02:00
2021-05-05 18:48:26 +02:00
2021-04-22 11:22:27 +02:00
2021-05-22 11:19:50 +01:00
2021-05-21 17:58:53 +01:00
2021-05-16 19:58:33 +02:00
2021-05-24 09:10:50 +02:00
2021-04-22 11:22:27 +02:00
2021-05-17 21:53:04 +02:00
2021-05-24 22:26:54 +04:30
2021-05-15 23:29:03 +01:00
2021-05-25 10:35:41 +02:00
2021-04-22 21:15:54 +02:00
2021-04-22 21:15:54 +02:00
2021-04-22 11:22:27 +02:00
2021-05-20 12:11:27 +01:00
2021-04-22 11:22:27 +02:00
2021-04-22 11:22:27 +02:00
2021-05-21 22:38:26 +01:00
2021-05-21 22:38:26 +01:00
2021-05-16 19:58:33 +02:00
2021-05-16 19:58:33 +02:00
2021-04-22 22:51:19 +02:00
2021-04-22 11:22:27 +02:00
2021-05-16 19:58:33 +02:00
2021-04-22 11:22:27 +02:00
2021-04-22 11:22:27 +02:00
2021-05-18 16:47:26 +02:00
2021-04-29 08:09:53 +02:00
2021-04-22 11:22:27 +02:00
2021-04-29 00:59:26 +02:00
2021-04-29 00:59:26 +02:00
2021-05-19 22:51:42 +02:00
2021-04-22 11:22:27 +02:00
2021-05-13 16:21:53 +02:00
2021-05-13 16:21:53 +02:00
2021-05-13 08:27:42 +02:00
2021-05-17 18:15:25 +02:00
2021-04-22 11:22:27 +02:00
2021-05-16 19:58:33 +02:00
2021-04-28 22:14:32 +02:00
2021-04-22 11:22:27 +02:00
2021-03-04 18:25:01 +01:00
2021-04-25 09:38:27 +02:00
2021-05-25 10:35:41 +02:00
2021-04-29 00:59:26 +02:00
2021-04-22 11:22:27 +02:00
2021-04-22 11:22:27 +02:00
2021-05-16 19:58:33 +02:00
2021-05-16 19:58:33 +02:00
2021-05-19 22:51:42 +02:00
2021-05-19 22:51:42 +02:00
2021-05-23 23:54:30 +01:00
2021-04-22 11:22:27 +02:00
2021-05-22 22:23:52 +02:00
2021-05-23 23:54:30 +01:00
2021-05-21 12:36:20 +02:00
2021-05-21 12:36:20 +02:00
2021-04-25 09:38:27 +02:00
2021-04-22 11:22:27 +02:00
2021-04-22 11:22:27 +02:00
2021-04-22 11:22:27 +02:00
2021-05-25 10:35:41 +02:00
2021-05-19 22:51:42 +02:00
2021-04-22 11:22:27 +02:00
2021-04-29 20:26:36 +02:00
2021-04-22 11:22:27 +02:00
2021-04-29 20:26:36 +02:00
2021-05-20 22:08:36 +02:00
2021-05-20 09:09:10 +02:00
2021-05-05 18:51:06 +02:00
2021-04-22 11:22:27 +02:00
2021-05-13 16:21:53 +02:00
2021-05-20 09:09:10 +02:00
2021-05-20 09:09:10 +02:00
2021-05-19 21:21:47 +01:00
2021-04-22 11:22:27 +02:00
2021-05-19 22:51:42 +02:00
2021-04-22 11:22:27 +02:00
2021-04-22 11:22:27 +02:00
2021-05-13 23:28:40 +02:00
2021-04-22 11:22:27 +02:00
2021-04-29 00:59:26 +02:00
2021-04-29 00:59:26 +02:00
2021-05-19 21:36:57 +02:00
2021-05-19 21:36:57 +02:00