Date: Tue, 17 Sep 2013 14:21:10 +0400 From: Gleb Smirnoff <glebius@FreeBSD.org> To: current@FreeBSD.org Subject: ipmi patch for review Message-ID: <20130917102110.GK4574@glebius.int.ru>
next in thread | raw e-mail | index | archive | help
[-- Attachment #1 --]
Hi!
When system is writing a kernel core dump, it issues watchdog
pat wdog_kern_pat(WD_LASTVAL). If ipmi is in action, it registers
ipmi_wd_event() as event for watchdog. Thus ipmi_wd_event() is
called in dumping context.
The problem is that ipmi_wd_event() calls into ipmi_set_watchdog(),
that calls into ipmi_alloc_request(), which uses M_WAITOK and
thus sleeps. This is a smaller problem, since can be converted to
M_NOWAIT. But ipmi_set_watchdog() then calls into
ipmi_submit_driver_request(), which calls msleep() any time.
The attached patch allows me to successfully write cores in
presence of IPMI.
--
Totus tuus, Glebius.
[-- Attachment #2 --]
Index: dev/ipmi/ipmi.c
===================================================================
--- dev/ipmi/ipmi.c (revision 255625)
+++ dev/ipmi/ipmi.c (working copy)
@@ -647,6 +647,9 @@ ipmi_wd_event(void *arg, unsigned int cmd, int *er
unsigned int timeout;
int e;
+ if (dumping)
+ return;
+
cmd &= WD_INTERVAL;
if (cmd > 0 && cmd <= 63) {
timeout = ((uint64_t)1 << cmd) / 1000000000;
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20130917102110.GK4574>
