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

PR kern/57363

XXX pullup-8
XXX pullup-9
XXX pullup-10
This commit is contained in:
riastradh 2023-04-18 06:37:25 +00:00
parent d9d44b7ea1
commit 4c0c4f7468
2 changed files with 10 additions and 4 deletions

View File

@ -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_t self, void *aux)
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);

View File

@ -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_t self, void *aux)
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);