From owner-cvs-all@FreeBSD.ORG Tue Mar 21 06:35:50 2006 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 5E9FC16A429; Tue, 21 Mar 2006 06:35:50 +0000 (UTC) (envelope-from ariff@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 798AE43D55; Tue, 21 Mar 2006 06:35:48 +0000 (GMT) (envelope-from ariff@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 k2L6Zmlm010845; Tue, 21 Mar 2006 06:35:48 GMT (envelope-from ariff@repoman.freebsd.org) Received: (from ariff@localhost) by repoman.freebsd.org (8.13.1/8.13.1/Submit) id k2L6ZmlL010844; Tue, 21 Mar 2006 06:35:48 GMT (envelope-from ariff) Message-Id: <200603210635.k2L6ZmlL010844@repoman.freebsd.org> From: Ariff Abdullah Date: Tue, 21 Mar 2006 06:35:48 +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 mixer.c sound.c sound.h 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, 21 Mar 2006 06:35:50 -0000 ariff 2006-03-21 06:35:48 UTC FreeBSD src repository Modified files: sys/dev/sound/pcm dsp.c mixer.c sound.c sound.h Log: Apply more thorough fixes while dealing with device opening and closing: - Determine open direction using 'flags', not 'mode'. This bug exist since past 4 years. - Don't allow opening the same device twice, be it in a same or different direction. - O_RDWR is allowed, provided that it is done by a single open (for example by mixer(8)) and the underlying hardware support true full-duplex operation. - Do various paranoid checking in case other process/thread trying to hijack the same device twice (or more). MFC after: 5 days Revision Changes Path 1.94 +73 -91 src/sys/dev/sound/pcm/dsp.c 1.49 +13 -1 src/sys/dev/sound/pcm/mixer.c 1.101 +188 -92 src/sys/dev/sound/pcm/sound.c 1.68 +1 -1 src/sys/dev/sound/pcm/sound.h