From: claudio Date: Sat, 5 Aug 2023 12:41:04 +0000 (+0000) Subject: Remove the P_WSLEEP specific KASSERT(). Not only procs in state SSTOP X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=1588c8424bef641c645c007c47349a63cc556a2d;p=openbsd Remove the P_WSLEEP specific KASSERT(). Not only procs in state SSTOP can be added to the run queue but also procs in state SRUN. The latter happens when schedcpu() kicks in before the proc had a chance to run. Problem spotted by gkoehler@ OK cheloha@ --- diff --git a/sys/kern/kern_sched.c b/sys/kern/kern_sched.c index b6d1ea68431..aad71cd9241 100644 --- a/sys/kern/kern_sched.c +++ b/sys/kern/kern_sched.c @@ -1,4 +1,4 @@ -/* $OpenBSD: kern_sched.c,v 1.82 2023/08/03 16:12:08 claudio Exp $ */ +/* $OpenBSD: kern_sched.c,v 1.83 2023/08/05 12:41:04 claudio Exp $ */ /* * Copyright (c) 2007, 2008 Artur Grabowski * @@ -262,7 +262,6 @@ setrunqueue(struct cpu_info *ci, struct proc *p, uint8_t prio) KASSERT(ci != NULL); SCHED_ASSERT_LOCKED(); - KASSERT(!ISSET(p->p_flag, P_WSLEEP) || p->p_stat == SSTOP); p->p_cpu = ci; p->p_stat = SRUN;