From owner-cvs-all Wed Feb 21 18:18:36 2001 Delivered-To: cvs-all@freebsd.org Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by hub.freebsd.org (Postfix) with ESMTP id 3FE4437B491; Wed, 21 Feb 2001 18:18:33 -0800 (PST) (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by freefall.freebsd.org (8.11.1/8.11.1) id f1M2IX081475; Wed, 21 Feb 2001 18:18:33 -0800 (PST) (envelope-from jhb) Message-Id: <200102220218.f1M2IX081475@freefall.freebsd.org> From: John Baldwin Date: Wed, 21 Feb 2001 18:18:33 -0800 (PST) To: cvs-committers@FreeBSD.org, cvs-all@FreeBSD.org Subject: cvs commit: src/sys/kern kern_intr.c src/sys/sys interrupt.h X-FreeBSD-CVS-Branch: HEAD Sender: owner-cvs-all@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG jhb 2001/02/21 18:18:33 PST Modified files: sys/kern kern_intr.c sys/sys interrupt.h Log: Work around a race condition where an interrupt handler can be removed from an interrupt thread while the interrupt thread is blocked on Giant waiting to execute the interrupt handler being removed. The result was that the intrhand structure would be free'd, and we would call 0xdeadc0de. The work around is to check to see if the interrupt thread is idle when removing a handler. If not, then we mark the interrupt handler as being dead using the new IH_DEAD flag and don't remove it from the interrupt threads' list of handlers. When the interrupt thread resumes, it will see a dead handler while traversing the list of handlers and will remove the handler then. Revision Changes Path 1.46 +35 -4 src/sys/kern/kern_intr.c 1.15 +2 -1 src/sys/sys/interrupt.h To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe cvs-all" in the body of the message