Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/dev take interrupt lock when closing backend.
details: https://anonhg.NetBSD.org/src/rev/77fc53d03c76
branches: trunk
changeset: 841181:77fc53d03c76
user: mlelstv <mlelstv%NetBSD.org@localhost>
date: Thu May 02 09:19:28 2019 +0000
description:
take interrupt lock when closing backend.
diffstat:
sys/dev/audio.c | 9 ++++++---
1 files changed, 6 insertions(+), 3 deletions(-)
diffs (31 lines):
diff -r 64850980c145 -r 77fc53d03c76 sys/dev/audio.c
--- a/sys/dev/audio.c Thu May 02 02:51:01 2019 +0000
+++ b/sys/dev/audio.c Thu May 02 09:19:28 2019 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: audio.c,v 1.459 2019/02/27 02:27:38 mrg Exp $ */
+/* $NetBSD: audio.c,v 1.460 2019/05/02 09:19:28 mlelstv 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.459 2019/02/27 02:27:38 mrg Exp $");
+__KERNEL_RCSID(0, "$NetBSD: audio.c,v 1.460 2019/05/02 09:19:28 mlelstv Exp $");
#ifdef _KERNEL_OPT
#include "audio.h"
@@ -2366,8 +2366,11 @@
bad:
audio_destroy_pfilters(vc);
audio_destroy_rfilters(vc);
- if (hw->close != NULL && sc->sc_opens == 0 && sc->sc_recopens == 0)
+ if (hw->close != NULL && sc->sc_opens == 0 && sc->sc_recopens == 0) {
+ mutex_enter(sc->sc_intr_lock);
hw->close(sc->hw_hdl);
+ mutex_exit(sc->sc_intr_lock);
+ }
mutex_exit(sc->sc_lock);
if (sc->sc_usemixer) {
audio_free_ring(sc, &vc->sc_mpr);
Home |
Main Index |
Thread Index |
Old Index