svn commit: r334087 - head/sys/kern
Mateusz Guzik
mjg at FreeBSD.org
Wed May 23 10:13:18 UTC 2018
Author: mjg
Date: Wed May 23 10:13:17 2018
New Revision: 334087
URL: https://svnweb.freebsd.org/changeset/base/334087
Log:
Remove incorrect owepreempt assertion added in r334062
Yet another preemption request hitting between the counter being 0
and the check being reached will result in the flag no longer being
set.
Note the situation was already present prior to r334062 and is harmless.
Reported by: pho
Reviewed by: kib
Modified:
head/sys/kern/kern_switch.c
Modified: head/sys/kern/kern_switch.c
==============================================================================
--- head/sys/kern/kern_switch.c Wed May 23 10:03:09 2018 (r334086)
+++ head/sys/kern/kern_switch.c Wed May 23 10:13:17 2018 (r334087)
@@ -215,9 +215,13 @@ critical_exit_preempt(void)
struct thread *td;
int flags;
+ /*
+ * If td_critnest is 0, it is possible that we are going to get
+ * preempted again before reaching the code below. This happens
+ * rarely and is harmless. However, this means td_owepreempt may
+ * now be unset.
+ */
td = curthread;
- KASSERT(td->td_owepreempt != 0,
- ("critical_exit: td_owepreempt == 0"));
if (td->td_critnest != 0)
return;
if (kdb_active)
More information about the svn-src-all
mailing list