Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/netbsd-9]: src/sys/dev/audio Pull up following revision(s) (requested by...



details:   https://anonhg.NetBSD.org/src/rev/f3ffda139e19
branches:  netbsd-9
changeset: 964230:f3ffda139e19
user:      martin <martin%NetBSD.org@localhost>
date:      Sat Dec 19 13:54:56 2020 +0000

description:
Pull up following revision(s) (requested by isaki in ticket #1158):

        sys/dev/audio/audio.c: revision 1.83

Avoid a dead lock in audiodetach, since rev 1.63.
audio_unlink() must be called without exlock held (and
audio_mixer_destroy() must be called with exlock held).

This makes unplugging during playing/recording work (again).

Reported by Julian Coleman on current-users:
 http://mail-index.netbsd.org/current-users/2020/12/10/msg040050.html

diffstat:

 sys/dev/audio/audio.c |  6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diffs (34 lines):

diff -r 216d4a15f589 -r f3ffda139e19 sys/dev/audio/audio.c
--- a/sys/dev/audio/audio.c     Sat Dec 19 13:52:36 2020 +0000
+++ b/sys/dev/audio/audio.c     Sat Dec 19 13:54:56 2020 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: audio.c,v 1.28.2.17 2020/12/19 13:48:27 martin Exp $   */
+/*     $NetBSD: audio.c,v 1.28.2.18 2020/12/19 13:54:56 martin Exp $   */
 
 /*-
  * Copyright (c) 2008 The NetBSD Foundation, Inc.
@@ -138,7 +138,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: audio.c,v 1.28.2.17 2020/12/19 13:48:27 martin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: audio.c,v 1.28.2.18 2020/12/19 13:54:56 martin Exp $");
 
 #ifdef _KERNEL_OPT
 #include "audio.h"
@@ -1324,7 +1324,6 @@
         * that hold sc, and any new calls with files that were for sc will
         * fail.  Thus, we now have exclusive access to the softc.
         */
-       sc->sc_exlock = 1;
 
        /*
         * Nuke all open instances.
@@ -1350,6 +1349,7 @@
        pmf_device_deregister(self);
 
        /* Free resources */
+       sc->sc_exlock = 1;
        if (sc->sc_pmixer) {
                audio_mixer_destroy(sc, sc->sc_pmixer);
                kmem_free(sc->sc_pmixer, sizeof(*sc->sc_pmixer));



Home | Main Index | Thread Index | Old Index