From owner-cvs-all@FreeBSD.ORG Sun Jul 22 20:53:29 2007 Return-Path: Delivered-To: cvs-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 42F9216A494; Sun, 22 Jul 2007 20:53:29 +0000 (UTC) (envelope-from thompsa@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id D6DB113C480; Sun, 22 Jul 2007 20:53:28 +0000 (UTC) (envelope-from thompsa@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id l6MKrSN5040650; Sun, 22 Jul 2007 20:53:28 GMT (envelope-from thompsa@repoman.freebsd.org) Received: (from thompsa@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id l6MKrS6v040649; Sun, 22 Jul 2007 20:53:28 GMT (envelope-from thompsa) Message-Id: <200707222053.l6MKrS6v040649@repoman.freebsd.org> From: Andrew Thompson Date: Sun, 22 Jul 2007 20:53:28 +0000 (UTC) To: src-committers@FreeBSD.org, cvs-src@FreeBSD.org, cvs-all@FreeBSD.org X-FreeBSD-CVS-Branch: HEAD Cc: Subject: cvs commit: src/sys/compat/ndis subr_ntoskrnl.c X-BeenThere: cvs-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: CVS commit messages for the entire tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 22 Jul 2007 20:53:29 -0000 thompsa 2007-07-22 20:53:28 UTC FreeBSD src repository Modified files: sys/compat/ndis subr_ntoskrnl.c Log: ndis will signal the kthread to exit and then sleep on the proc pointer to be woken up by kthread_exit. This is racey and in some cases the kthread will exit before ndis gets around to sleep so it will be stuck indefinitely. This change reuses the kq_exit variable to indicate that the thread has gone and will loop on tsleep with a timeout waiting for it. If the kthread has already exited then it will not sleep at all. Approved by: re (rwatson) Revision Changes Path 1.90 +6 -2 src/sys/compat/ndis/subr_ntoskrnl.c