From owner-cvs-src@FreeBSD.ORG Mon Mar 1 15:07:58 2004 Return-Path: Delivered-To: cvs-src@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id AA71016A4CE; Mon, 1 Mar 2004 15:07:58 -0800 (PST) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id A552D43D2F; Mon, 1 Mar 2004 15:07:58 -0800 (PST) (envelope-from jhb@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.12.10/8.12.10) with ESMTP id i21N7wGe098623; Mon, 1 Mar 2004 15:07:58 -0800 (PST) (envelope-from jhb@repoman.freebsd.org) Received: (from jhb@localhost) by repoman.freebsd.org (8.12.10/8.12.10/Submit) id i21N7woI098622; Mon, 1 Mar 2004 15:07:58 -0800 (PST) (envelope-from jhb) Message-Id: <200403012307.i21N7woI098622@repoman.freebsd.org> From: John Baldwin Date: Mon, 1 Mar 2004 15:07:58 -0800 (PST) To: src-committers@FreeBSD.org, cvs-src@FreeBSD.org, cvs-all@FreeBSD.org X-FreeBSD-CVS-Branch: HEAD Subject: cvs commit: src/sys/kern kern_thread.c X-BeenThere: cvs-src@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: CVS commit messages for the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 01 Mar 2004 23:07:58 -0000 jhb 2004/03/01 15:07:58 PST FreeBSD src repository Modified files: sys/kern kern_thread.c Log: Check for TDF_SINTR before calling sleepq_abort() as there is a narrow race in between sleepq_add() and sleepq_catch_signals() in that setting td_wchan and TDF_SINTR is not atomic to sched_lock but only to the sleepq lock. This band-aid will stop assertion failures, but there is perhaps a larger problem with the sleepq_add/sleepq_catch_signals race that I am not sure how to solve. For the signals case the race is harmless because we always call cursig() after setting TDF_SINTR. However, KSE doesn't do anything in sleepq_catch_signals() to check that this race was lost, so I am unsure if this race is harmful for this specific abort. Revision Changes Path 1.172 +1 -1 src/sys/kern/kern_thread.c