Module Name: src
Committed By: riastradh
Date: Tue Mar 29 09:16:24 UTC 2022
Modified Files:
src/sys/dev/pci: cs4281.c
Log Message:
cs4281(4): Fix lock ordering in suspend.
No idea if this code works -- obviously this path has never been
tested in the >decade it's been here!
To generate a diff of this commit:
cvs rdiff -u -r1.57 -r1.58 src/sys/dev/pci/cs4281.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/pci/cs4281.c
diff -u src/sys/dev/pci/cs4281.c:1.57 src/sys/dev/pci/cs4281.c:1.58
--- src/sys/dev/pci/cs4281.c:1.57 Wed Feb 3 14:44:32 2021
+++ src/sys/dev/pci/cs4281.c Tue Mar 29 09:16:24 2022
@@ -1,4 +1,4 @@
-/* $NetBSD: cs4281.c,v 1.57 2021/02/03 14:44:32 isaki Exp $ */
+/* $NetBSD: cs4281.c,v 1.58 2022/03/29 09:16:24 riastradh Exp $ */
/*
* Copyright (c) 2000 Tatoku Ogaito. All rights reserved.
@@ -43,7 +43,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: cs4281.c,v 1.57 2021/02/03 14:44:32 isaki Exp $");
+__KERNEL_RCSID(0, "$NetBSD: cs4281.c,v 1.58 2022/03/29 09:16:24 riastradh Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -613,7 +613,7 @@ cs4281_suspend(device_t dv, const pmf_qu
struct cs428x_softc *sc = device_private(dv);
mutex_enter(&sc->sc_lock);
- mutex_spin_exit(&sc->sc_intr_lock);
+ mutex_spin_enter(&sc->sc_intr_lock);
/* save current playback status */
if (sc->sc_prun) {