Source-Changes-HG archive

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

[src/trunk]: src/sys/dev Don't call grow_mixer_states with sc_intr_lock held.



details:   https://anonhg.NetBSD.org/src/rev/333a88e0d7ab
branches:  trunk
changeset: 821718:333a88e0d7ab
user:      nat <nat%NetBSD.org@localhost>
date:      Tue Feb 14 09:41:29 2017 +0000

description:
Don't call grow_mixer_states with sc_intr_lock held.

Addresses PR kern/51965.

diffstat:

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

diffs (34 lines):

diff -r 2b97ce39fac6 -r 333a88e0d7ab sys/dev/audio.c
--- a/sys/dev/audio.c   Tue Feb 14 09:11:05 2017 +0000
+++ b/sys/dev/audio.c   Tue Feb 14 09:41:29 2017 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: audio.c,v 1.305 2017/02/13 04:47:59 ozaki-r Exp $      */
+/*     $NetBSD: audio.c,v 1.306 2017/02/14 09:41:29 nat Exp $  */
 
 /*-
  * Copyright (c) 2016 Nathanial Sloss <nathanialsloss%yahoo.com.au@localhost>
@@ -148,7 +148,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: audio.c,v 1.305 2017/02/13 04:47:59 ozaki-r Exp $");
+__KERNEL_RCSID(0, "$NetBSD: audio.c,v 1.306 2017/02/14 09:41:29 nat Exp $");
 
 #include "audio.h"
 #if NAUDIO > 0
@@ -2169,6 +2169,7 @@
 
        DPRINTF(("audio_open: done sc_mode = 0x%x\n", vc->sc_mode));
 
+       grow_mixer_states(sc, 2);
        mutex_enter(sc->sc_intr_lock);
        if (flags & FREAD)
                sc->sc_recopens++;
@@ -2176,7 +2177,6 @@
        chan->dev = dev;
        chan->chan = n;
        chan->deschan = n;
-       grow_mixer_states(sc, 2);
        SIMPLEQ_INSERT_TAIL(&sc->sc_audiochan, chan, entries);
        mutex_exit(sc->sc_intr_lock);
 



Home | Main Index | Thread Index | Old Index