Module Name:    src
Committed By:   isaki
Date:           Wed Jan  8 08:10:15 UTC 2020

Modified Files:
        src/sys/dev/audio: audio.c

Log Message:
Move mutex_exit() correct place to protect sc_async_mixer.
Thanks maxv@!


To generate a diff of this commit:
cvs rdiff -u -r1.36 -r1.37 src/sys/dev/audio/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/audio.c
diff -u src/sys/dev/audio/audio.c:1.36 src/sys/dev/audio/audio.c:1.37
--- src/sys/dev/audio/audio.c:1.36	Fri Dec 27 09:45:26 2019
+++ src/sys/dev/audio/audio.c	Wed Jan  8 08:10:15 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: audio.c,v 1.36 2019/12/27 09:45:26 msaitoh Exp $	*/
+/*	$NetBSD: audio.c,v 1.37 2020/01/08 08:10:15 isaki Exp $	*/
 
 /*-
  * Copyright (c) 2008 The NetBSD Foundation, Inc.
@@ -142,7 +142,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: audio.c,v 1.36 2019/12/27 09:45:26 msaitoh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: audio.c,v 1.37 2020/01/08 08:10:15 isaki Exp $");
 
 #ifdef _KERNEL_OPT
 #include "audio.h"
@@ -7694,12 +7694,12 @@ mixer_ioctl(struct audio_softc *sc, u_lo
 		}
 		mutex_enter(sc->sc_lock);
 		mixer_remove(sc);	/* remove old entry */
-		mutex_exit(sc->sc_lock);
 		if (ma != NULL) {
 			ma->next = sc->sc_async_mixer;
 			ma->pid = curproc->p_pid;
 			sc->sc_async_mixer = ma;
 		}
+		mutex_exit(sc->sc_lock);
 		error = 0;
 		break;
 

Reply via email to