Module Name: src Committed By: riz Date: Wed Jun 13 19:14:18 UTC 2012
Modified Files: src/sys/dev [netbsd-6]: audio.c Log Message: Pull up following revision(s) (requested by mrg in ticket #331): sys/dev/audio.c: revision 1.261 ensure that the intr lock is held for all audio_clear() callers. To generate a diff of this commit: cvs rdiff -u -r1.257.2.3 -r1.257.2.4 src/sys/dev/audio.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/sys/dev/audio.c diff -u src/sys/dev/audio.c:1.257.2.3 src/sys/dev/audio.c:1.257.2.4 --- src/sys/dev/audio.c:1.257.2.3 Mon May 7 03:03:18 2012 +++ src/sys/dev/audio.c Wed Jun 13 19:14:17 2012 @@ -1,4 +1,4 @@ -/* $NetBSD: audio.c,v 1.257.2.3 2012/05/07 03:03:18 riz Exp $ */ +/* $NetBSD: audio.c,v 1.257.2.4 2012/06/13 19:14:17 riz Exp $ */ /*- * Copyright (c) 2008 The NetBSD Foundation, Inc. @@ -155,7 +155,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: audio.c,v 1.257.2.3 2012/05/07 03:03:18 riz Exp $"); +__KERNEL_RCSID(0, "$NetBSD: audio.c,v 1.257.2.4 2012/06/13 19:14:17 riz Exp $"); #include "audio.h" #if NAUDIO > 0 @@ -1991,7 +1991,7 @@ void audio_clear(struct audio_softc *sc) { - KASSERT(mutex_owned(sc->sc_lock)); + KASSERT(mutex_owned(sc->sc_intr_lock)); if (sc->sc_rbus) { cv_broadcast(&sc->sc_rchan); @@ -2387,8 +2387,8 @@ audio_ioctl(struct audio_softc *sc, u_lo DPRINTF(("AUDIO_FLUSH\n")); rbus = sc->sc_rbus; pbus = sc->sc_pbus; - audio_clear(sc); mutex_enter(sc->sc_intr_lock); + audio_clear(sc); error = audio_initbufs(sc); if (error) { mutex_exit(sc->sc_intr_lock);