Source-Changes-HG archive

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

[src/trunk]: src/sys/dev sb(4): Fix missing mutex initialization at isapnp an...



details:   https://anonhg.NetBSD.org/src/rev/f29136ed6ba7
branches:  trunk
changeset: 374309:f29136ed6ba7
user:      riastradh <riastradh%NetBSD.org@localhost>
date:      Tue Apr 18 06:37:25 2023 +0000

description:
sb(4): Fix missing mutex initialization at isapnp and ofisa.

PR kern/57363

XXX pullup-8
XXX pullup-9
XXX pullup-10

diffstat:

 sys/dev/isapnp/sb_isapnp.c |  7 +++++--
 sys/dev/ofisa/sb_ofisa.c   |  7 +++++--
 2 files changed, 10 insertions(+), 4 deletions(-)

diffs (56 lines):

diff -r b84c02cbdc30 -r f29136ed6ba7 sys/dev/isapnp/sb_isapnp.c
--- a/sys/dev/isapnp/sb_isapnp.c        Tue Apr 18 00:21:23 2023 +0000
+++ b/sys/dev/isapnp/sb_isapnp.c        Tue Apr 18 06:37:25 2023 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: sb_isapnp.c,v 1.53 2019/05/08 13:40:18 isaki Exp $     */
+/*     $NetBSD: sb_isapnp.c,v 1.54 2023/04/18 06:37:25 riastradh Exp $ */
 
 /*
  * Copyright (c) 1991-1993 Regents of the University of California.
@@ -35,7 +35,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: sb_isapnp.c,v 1.53 2019/05/08 13:40:18 isaki Exp $");
+__KERNEL_RCSID(0, "$NetBSD: sb_isapnp.c,v 1.54 2023/04/18 06:37:25 riastradh Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -158,6 +158,9 @@ sb_isapnp_attach(device_t parent, device
                return;
        }
 
+       mutex_init(&sc->sc_lock, MUTEX_DEFAULT, IPL_NONE);
+       mutex_init(&sc->sc_intr_lock, MUTEX_DEFAULT, IPL_AUDIO);
+
        sc->sc_ih = isa_intr_establish(ipa->ipa_ic, ipa->ipa_irq[0].num,
            ipa->ipa_irq[0].type, IPL_AUDIO, sbdsp_intr, sc);
 
diff -r b84c02cbdc30 -r f29136ed6ba7 sys/dev/ofisa/sb_ofisa.c
--- a/sys/dev/ofisa/sb_ofisa.c  Tue Apr 18 00:21:23 2023 +0000
+++ b/sys/dev/ofisa/sb_ofisa.c  Tue Apr 18 06:37:25 2023 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: sb_ofisa.c,v 1.23 2021/01/27 03:10:21 thorpej Exp $    */
+/*     $NetBSD: sb_ofisa.c,v 1.24 2023/04/18 06:37:25 riastradh Exp $  */
 
 /*-
  * Copyright (c) 1998 The NetBSD Foundation, Inc.
@@ -31,7 +31,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: sb_ofisa.c,v 1.23 2021/01/27 03:10:21 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: sb_ofisa.c,v 1.24 2023/04/18 06:37:25 riastradh Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -170,6 +170,9 @@ sb_ofisa_attach(device_t parent, device_
                return;
        }
 
+       mutex_init(&sc->sc_lock, MUTEX_DEFAULT, IPL_NONE);
+       mutex_init(&sc->sc_intr_lock, MUTEX_DEFAULT, IPL_AUDIO);
+
        sc->sc_ih = isa_intr_establish(aa->ic, intr.irq, IST_EDGE, IPL_AUDIO,
            sbdsp_intr, sc);
 



Home | Main Index | Thread Index | Old Index