mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* softdog.c kernel 2.4.29
@ 2005-03-16  7:50 Jacques Basson
  2005-03-16 12:19 ` Marcelo Tosatti
  0 siblings, 1 reply; 2+ messages in thread
From: Jacques Basson @ 2005-03-16  7:50 UTC (permalink / raw)
  To: linux-kernel

Hi

There is a bug in the softdog.c (v 0.05) in the 2.4 kernel series
(certainly in 2.4.29 and there are no references to it in the latest
Changelog) that won't reboot the machine if /dev/watchdog is closed
unexpectedly and nowayout is not set. The softdog.c (v 0.07) in 2.6.11
is not affected, but I have been informed by the vendor of analog output
cards that we use (ICP DAS) that they currently have no plans to port
their driver to the 2.6 series.

Anyway, here is a simple patch that does the job. I hope that it is of
use to someone:

diff -Naur softdog.c.orig softdog.c
--- softdog.c.orig      2003-11-28 20:26:20.000000000 +0200
+++ softdog.c   2005-03-16 09:12:34.000000000 +0200
@@ -124,7 +124,7 @@
         *      Shut off the timer.
         *      Lock it in if it's a module and we set nowayout
         */
-       if (expect_close || nowayout == 0) {
+       if (expect_close && nowayout == 0) {
                del_timer(&watchdog_ticktock);
        } else {
                printk(KERN_CRIT "SOFTDOG: WDT device closed
unexpectedly.  WDT will not stop!\n");

Jacques


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: softdog.c kernel 2.4.29
  2005-03-16  7:50 softdog.c kernel 2.4.29 Jacques Basson
@ 2005-03-16 12:19 ` Marcelo Tosatti
  0 siblings, 0 replies; 2+ messages in thread
From: Marcelo Tosatti @ 2005-03-16 12:19 UTC (permalink / raw)
  To: Jacques Basson; +Cc: linux-kernel, Alan Cox


Hi Jacques

On Wed, Mar 16, 2005 at 09:50:27AM +0200, Jacques Basson wrote:
> Hi
> 
> There is a bug in the softdog.c (v 0.05) in the 2.4 kernel series
> (certainly in 2.4.29 and there are no references to it in the latest
> Changelog) that won't reboot the machine if /dev/watchdog is closed
> unexpectedly and nowayout is not set.

Yup, thanks. Applied.

> diff -Naur softdog.c.orig softdog.c
> --- softdog.c.orig      2003-11-28 20:26:20.000000000 +0200
> +++ softdog.c   2005-03-16 09:12:34.000000000 +0200
> @@ -124,7 +124,7 @@
>          *      Shut off the timer.
>          *      Lock it in if it's a module and we set nowayout
>          */
> -       if (expect_close || nowayout == 0) {
> +       if (expect_close && nowayout == 0) {
>                 del_timer(&watchdog_ticktock);
>         } else {
>                 printk(KERN_CRIT "SOFTDOG: WDT device closed
> unexpectedly.  WDT will not stop!\n");

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2005-03-16 17:24 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-03-16  7:50 softdog.c kernel 2.4.29 Jacques Basson
2005-03-16 12:19 ` Marcelo Tosatti

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®