diff options
| author | riastradh <riastradh@NetBSD.org> | 2021-10-10 11:21:05 +0000 |
|---|---|---|
| committer | riastradh <riastradh@NetBSD.org> | 2021-10-10 11:21:05 +0000 |
| commit | bb18b00d04ee512d526a620a8e16276e464d6241 (patch) | |
| tree | ec33857ad39f3977c60988a62eae89a57e0d8cc3 /sys/dev/audio | |
| parent | 1a84f945a21b863b672b39b21703ca6ea26a7fe3 (diff) | |
audio(9): Issue pserialize_perform outside sc_lock in audiodetach.
Breaks another deadlock between sc_lock and high-priority xcalls at
softint serial. With any luck, this should be the last such softint
deadlock in audio!
Diffstat (limited to 'sys/dev/audio')
| -rw-r--r-- | sys/dev/audio/audio.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/sys/dev/audio/audio.c b/sys/dev/audio/audio.c index ff81b9d6997..e66d5d6466e 100644 --- a/sys/dev/audio/audio.c +++ b/sys/dev/audio/audio.c @@ -1,4 +1,4 @@ -/* $NetBSD: audio.c,v 1.109 2021/10/10 11:20:29 riastradh Exp $ */ +/* $NetBSD: audio.c,v 1.110 2021/10/10 11:21:05 riastradh Exp $ */ /*- * Copyright (c) 2008 The NetBSD Foundation, Inc. @@ -138,7 +138,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: audio.c,v 1.109 2021/10/10 11:20:29 riastradh Exp $"); +__KERNEL_RCSID(0, "$NetBSD: audio.c,v 1.110 2021/10/10 11:21:05 riastradh Exp $"); #ifdef _KERNEL_OPT #include "audio.h" @@ -1322,6 +1322,7 @@ audiodetach(device_t self, int flags) SLIST_FOREACH(file, &sc->sc_files, entry) { atomic_store_relaxed(&file->dying, true); } + mutex_exit(sc->sc_lock); /* * Wait for existing users to drain. @@ -1331,7 +1332,6 @@ audiodetach(device_t self, int flags) * be psref_released. */ pserialize_perform(sc->sc_psz); - mutex_exit(sc->sc_lock); psref_target_destroy(&sc->sc_psref, audio_psref_class); /* |
