Module Name: src Committed By: maxv Date: Fri Aug 23 09:41:26 UTC 2019
Modified Files: src/sys/dev/audio: audio.c Log Message: Add missing mutex, we were hitting a KASSERT. To generate a diff of this commit: cvs rdiff -u -r1.28 -r1.29 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.28 src/sys/dev/audio/audio.c:1.29 --- src/sys/dev/audio/audio.c:1.28 Wed Jul 10 13:26:47 2019 +++ src/sys/dev/audio/audio.c Fri Aug 23 09:41:26 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: audio.c,v 1.28 2019/07/10 13:26:47 isaki Exp $ */ +/* $NetBSD: audio.c,v 1.29 2019/08/23 09:41:26 maxv Exp $ */ /*- * Copyright (c) 2008 The NetBSD Foundation, Inc. @@ -142,7 +142,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: audio.c,v 1.28 2019/07/10 13:26:47 isaki Exp $"); +__KERNEL_RCSID(0, "$NetBSD: audio.c,v 1.29 2019/08/23 09:41:26 maxv Exp $"); #ifdef _KERNEL_OPT #include "audio.h" @@ -7726,7 +7726,9 @@ mixer_ioctl(struct audio_softc *sc, u_lo } else { ma = NULL; } + 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;