From owner-cvs-all@FreeBSD.ORG Mon Sep 12 18:33:34 2005 Return-Path: X-Original-To: cvs-all@FreeBSD.org Delivered-To: cvs-all@FreeBSD.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 8886C16A41F; Mon, 12 Sep 2005 18:33:34 +0000 (GMT) (envelope-from netchild@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 5831543D48; Mon, 12 Sep 2005 18:33:34 +0000 (GMT) (envelope-from netchild@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.1/8.13.1) with ESMTP id j8CIXY7C071007; Mon, 12 Sep 2005 18:33:34 GMT (envelope-from netchild@repoman.freebsd.org) Received: (from netchild@localhost) by repoman.freebsd.org (8.13.1/8.13.1/Submit) id j8CIXYNM071006; Mon, 12 Sep 2005 18:33:34 GMT (envelope-from netchild) Message-Id: <200509121833.j8CIXYNM071006@repoman.freebsd.org> From: Alexander Leidinger Date: Mon, 12 Sep 2005 18:33:34 +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/dev/sound/pcm dsp.c sound.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: Mon, 12 Sep 2005 18:33:34 -0000 netchild 2005-09-12 18:33:34 UTC FreeBSD src repository Modified files: sys/dev/sound/pcm dsp.c sound.c Log: - Fix the locking in dsp.c to prevent a LOR (AFAIK not on the LOR page). - Remove an assertion in sound.c, it's not needed (and causes a panic now). From the conversation via mail between glebius and Ariff: ---snip--- > Well, but which mutex protects now? Do we own anything else > in pcm_chnalloc()? I see some queue(4) macros in pcm_chnalloc(), > they should be protected, shouldn't they? Queue insertion/removal occur during 1) driver loading (which is pretty much single thread / sequential) or unloading (mutex protected, bail out if there is any channel with refcount > 0 or busy). 2) vchan_create()/destroy(), (which is *sigh* quite complicated), but somehow protected by 'master'/parent channel mutex. Other thread cannot add/remove vchan (or even continue traversing that queue) unless it can acquire parent channel mutex. ---snip--- Fix the locking in dsp.c to prevent a LOR (AFAIK not on the LOR page). Submitted by: Ariff Abdullah Tested with: INVARIANTS[1] and DIAGNOSTICS[2] Tested by: netchild [1,2], David Reid [1] Revision Changes Path 1.84 +3 -3 src/sys/dev/sound/pcm/dsp.c 1.96 +0 -2 src/sys/dev/sound/pcm/sound.c