From 02015f69f6cf7630015f26b349076fe7b9e76de1 Mon Sep 17 00:00:00 2001 From: cinap_lenrek Date: Thu, 4 Jan 2024 04:22:04 +0000 Subject: [PATCH] kernel: make sure process is in Queueing state in qunlock() --- sys/src/9/port/qlock.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sys/src/9/port/qlock.c b/sys/src/9/port/qlock.c index fa8a064e3..0490b965c 100644 --- a/sys/src/9/port/qlock.c +++ b/sys/src/9/port/qlock.c @@ -134,6 +134,8 @@ qunlock(QLock *q) getcallerpc(&q)); p = q->head; if(p != nil){ + if(p->state != Queueing) + panic("qunlock"); q->pc = p->qpc; q->head = p->qnext; if(q->head == nil)