Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/dev/pci cs4281(4): Fix lock ordering in suspend.



details:   https://anonhg.NetBSD.org/src/rev/b348d30fc07c
branches:  trunk
changeset: 364565:b348d30fc07c
user:      riastradh <riastradh%NetBSD.org@localhost>
date:      Tue Mar 29 09:16:24 2022 +0000

description:
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!

diffstat:

 sys/dev/pci/cs4281.c |  6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diffs (27 lines):

diff -r 71ca0abcdb8d -r b348d30fc07c sys/dev/pci/cs4281.c
--- a/sys/dev/pci/cs4281.c      Tue Mar 29 09:08:44 2022 +0000
+++ b/sys/dev/pci/cs4281.c      Tue Mar 29 09:16:24 2022 +0000
@@ -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 @@
        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) {



Home | Main Index | Thread Index | Old Index