summaryrefslogtreecommitdiff
path: root/sys/dev/ipmi.c
diff options
context:
space:
mode:
authorYASUOKA Masahiko <yasuoka@cvs.openbsd.org>2018-06-15 12:21:42 +0000
committerYASUOKA Masahiko <yasuoka@cvs.openbsd.org>2018-06-15 12:21:42 +0000
commit9e854404ac45f6a17b239720f7cf12df79de20da (patch)
treecfd41c58f56250e402dc82933ef64113fc9dbee6 /sys/dev/ipmi.c
parent82365ac16a086eddd365d72a6a1d373000066bd4 (diff)
Use IPL_MPFLOOR for ipmi mutex to prevent a interrupt which requires
KERNEL_LOCK(). This fixes the panic with with witness. diff from fukaumi at soum.co.jp. input and ok mpi
Diffstat (limited to 'sys/dev/ipmi.c')
-rw-r--r--sys/dev/ipmi.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/sys/dev/ipmi.c b/sys/dev/ipmi.c
index c2e3199f16c..65eeb846b86 100644
--- a/sys/dev/ipmi.c
+++ b/sys/dev/ipmi.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ipmi.c,v 1.101 2018/04/13 05:33:38 yasuoka Exp $ */
+/* $OpenBSD: ipmi.c,v 1.102 2018/06/15 12:21:41 yasuoka Exp $ */
/*
* Copyright (c) 2015 Masao Uebayashi
@@ -1653,7 +1653,7 @@ ipmi_match(struct device *parent, void *match, void *aux)
/* XXX local softc is wrong wrong wrong */
sc = malloc(sizeof(*sc), M_TEMP, M_WAITOK | M_ZERO);
- mtx_init(&sc->sc_cmd_mtx, IPL_NONE);
+ mtx_init(&sc->sc_cmd_mtx, IPL_MPFLOOR);
strlcpy(sc->sc_dev.dv_xname, "ipmi0", sizeof(sc->sc_dev.dv_xname));
/* Map registers */
@@ -1726,7 +1726,7 @@ ipmi_attach(struct device *parent, struct device *self, void *aux)
c->c_ccode = -1;
sc->sc_cmd_taskq = taskq_create("ipmicmd", 1, IPL_NONE, TASKQ_MPSAFE);
- mtx_init(&sc->sc_cmd_mtx, IPL_NONE);
+ mtx_init(&sc->sc_cmd_mtx, IPL_MPFLOOR);
}
int