Date: Wed, 14 Oct 2009 15:15:23 GMT From: Dmitrij Tejblum <tejblum@yandex-team.ru> To: freebsd-gnats-submit@FreeBSD.org Subject: kern/139604: [patch] ichwd watchdog sometimes does not enable Message-ID: <200910141515.n9EFFNaf049544@www.freebsd.org> Resent-Message-ID: <200910141520.n9EFK1Ol022084@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
>Number: 139604 >Category: kern >Synopsis: [patch] ichwd watchdog sometimes does not enable >Confidential: no >Severity: serious >Priority: medium >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Wed Oct 14 15:20:01 UTC 2009 >Closed-Date: >Last-Modified: >Originator: Dmitrij Tejblum >Release: 7.2-STABLE >Organization: OOO Yandex >Environment: >Description: ichwd process watchdog commands with the following code snippet: if (timeout != sc->timeout) { if (!sc->active) ichwd_tmr_enable(sc); ichwd_tmr_set(sc, timeout); } ichwd_tmr_reload(sc); I.e., ichwd is not enabled when timeout == sc->timeout >How-To-Repeat: Suppose you have ichwd configured and watchdogd running. If you stop watchdogd (/etc/rc.d/watchdogd stop) and then start it back (/etc/rc.d/watchdogd start), ichwd will not be enabled. Do it with sysctl debug.bootverbose=1, then ichwd print debug messages. >Fix: Patch attached with submission follows: --- sys/dev/ichwd/ichwd.c 2009-06-11 22:10:17.000000000 +0400 +++ sys/dev/ichwd/ichwd.c 2009-10-14 16:39:46.000000000 +0400 @@ -316,11 +316,10 @@ cmd &= WD_INTERVAL; timeout = ((uint64_t)1 << cmd) / ICHWD_TICK; if (cmd) { - if (timeout != sc->timeout) { - if (!sc->active) - ichwd_tmr_enable(sc); + if (!sc->active) + ichwd_tmr_enable(sc); + if (timeout != sc->timeout) ichwd_tmr_set(sc, timeout); - } ichwd_tmr_reload(sc); *error = 0; } else { >Release-Note: >Audit-Trail: >Unformatted:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200910141515.n9EFFNaf049544>