From owner-cvs-all@FreeBSD.ORG Fri Sep 10 09:37:07 2004 Return-Path: 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 2CCC316A4CE; Fri, 10 Sep 2004 09:37:07 +0000 (GMT) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 262CD43D3F; Fri, 10 Sep 2004 09:37:07 +0000 (GMT) (envelope-from truckman@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.12.11/8.12.11) with ESMTP id i8A9b74b046023; Fri, 10 Sep 2004 09:37:07 GMT (envelope-from truckman@repoman.freebsd.org) Received: (from truckman@localhost) by repoman.freebsd.org (8.12.11/8.12.11/Submit) id i8A9b6Gl046022; Fri, 10 Sep 2004 09:37:06 GMT (envelope-from truckman) Message-Id: <200409100937.i8A9b6Gl046022@repoman.freebsd.org> From: Don Lewis Date: Fri, 10 Sep 2004 09:37:06 +0000 (UTC) To: src-committers@FreeBSD.org, cvs-src@FreeBSD.org, cvs-all@FreeBSD.org X-FreeBSD-CVS-Branch: HEAD Subject: cvs commit: src/sys/dev/sound/pcm sndstat.c X-BeenThere: cvs-all@freebsd.org X-Mailman-Version: 2.1.1 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: Fri, 10 Sep 2004 09:37:07 -0000 truckman 2004-09-10 09:37:06 UTC FreeBSD src repository Modified files: sys/dev/sound/pcm sndstat.c Log: Convert sndstat_lock from a mutex to an sx lock. sndstat_read() holds sndstat_lock across a call to uiomove(), which is not legal to do with a mutex because of the possibility that the data transfer could sleep because of a page fault. It is not possible to just unlock the mutex for the uiomove() call without introducing another locking mechanism to prevent the body of sndstat_read() from being re-entered. Converting sndstat_lock to an sx lock is the least complicated change. This is a candidate for RELENG_5. LOR: 030 MFC after: 4 days Revision Changes Path 1.18 +29 -26 src/sys/dev/sound/pcm/sndstat.c