From owner-cvs-all@FreeBSD.ORG Tue Jun 26 21:42:02 2007 Return-Path: X-Original-To: cvs-all@FreeBSD.org Delivered-To: cvs-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id EA86916A421; Tue, 26 Jun 2007 21:42:02 +0000 (UTC) (envelope-from attilio@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [69.147.83.41]) by mx1.freebsd.org (Postfix) with ESMTP id DC38013C458; Tue, 26 Jun 2007 21:42:02 +0000 (UTC) (envelope-from attilio@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.8/8.13.8) with ESMTP id l5QLg2Ln018455; Tue, 26 Jun 2007 21:42:02 GMT (envelope-from attilio@repoman.freebsd.org) Received: (from attilio@localhost) by repoman.freebsd.org (8.13.8/8.13.8/Submit) id l5QLg220018450; Tue, 26 Jun 2007 21:42:02 GMT (envelope-from attilio) Message-Id: <200706262142.l5QLg220018450@repoman.freebsd.org> From: Attilio Rao Date: Tue, 26 Jun 2007 21:42:01 +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/kern kern_timeout.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: Tue, 26 Jun 2007 21:42:03 -0000 attilio 2007-06-26 21:42:01 UTC FreeBSD src repository Modified files: sys/kern kern_timeout.c Log: Fix an old standing LOR between callout_lock and sleepqueues chain (which could lead to a deadlock). - sleepq_set_timeout acquires callout_lock (via callout_reset()) only with sleepq chain lock held - msleep_spin in _callout_stop_safe lock the sleepqueue chain with callout_lock held In order to solve this don't use msleep_spin in _callout_stop_safe() but use directly sleepqueues as inline msleep_spin code. Rearrange the wakeup path in order to have it consistent too. Reported by: kris (via stress2 test suite) Tested by: Timothy Redaelli Reviewed by: jhb Approved by: jeff (mentor) Approved by: re Revision Changes Path 1.104 +35 -3 src/sys/kern/kern_timeout.c