From: visa Date: Mon, 15 Nov 2021 15:48:54 +0000 (+0000) Subject: Revert to eager removal of poll/select knotes X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=11ff4ff100659db2125a8f5af6c853c1088ef985;p=openbsd Revert to eager removal of poll/select knotes This should prevent a panic that bluhm@ has reported. --- diff --git a/sys/kern/kern_event.c b/sys/kern/kern_event.c index f52667f3c4d..a62f40460b0 100644 --- a/sys/kern/kern_event.c +++ b/sys/kern/kern_event.c @@ -1,4 +1,4 @@ -/* $OpenBSD: kern_event.c,v 1.172 2021/11/13 06:04:02 visa Exp $ */ +/* $OpenBSD: kern_event.c,v 1.173 2021/11/15 15:48:54 visa Exp $ */ /*- * Copyright (c) 1999,2000,2001 Jonathan Lemon @@ -813,6 +813,9 @@ kqpoll_done(unsigned int num) KASSERT(p->p_kq_serial + num >= p->p_kq_serial); p->p_kq_serial += num; + + /* XXX Work around a race condition. */ + kqueue_purge(p, p->p_kq); } void