public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Arnd Bergmann <arnd@arndb.de>
To: Chuck Ebbert <76306.1226@compuserve.com>
Cc: Michael Schierl <schierlm@gmx.de>,
	Joel Becker <joel.becker@oracle.com>,
	linux-kernel <linux-kernel@vger.kernel.org>,
	Wim Van Sebroeck <wim@iguana.be>
Subject: Re: [PATCH] softdog.c (was: Kernel panic after rmmod softdog (2.6.8.1))
Date: Mon, 11 Oct 2004 22:00:30 +0200	[thread overview]
Message-ID: <200410112200.33997.arnd@arndb.de> (raw)
In-Reply-To: <200410111304_MC3-1-8C02-813F@compuserve.com>

[-- Attachment #1: Type: text/plain, Size: 1031 bytes --]

On Maandag 11 Oktober 2004 19:01, Chuck Ebbert wrote:

> --- linux-2.6.8.1/drivers/char/watchdog/softdog.c.orig  Sun Oct 10 23:08:24 2004
> +++ linux-2.6.8.1/drivers/char/watchdog/softdog.c       Sun Oct 10 23:10:12 2004
> @@ -135,8 +135,9 @@
>  {
>         if(test_and_set_bit(0, &timer_alive))
>                 return -EBUSY;
> -       if (nowayout)
> -               __module_get(THIS_MODULE);
> +
> +       __module_get(THIS_MODULE);
> +
>         /*
>          *      Activate timer
>          */
> @@ -152,6 +153,7 @@
>          */
>         if (expect_close == 42) {
>                 softdog_stop();
> +               module_put(THIS_MODULE);
>         } else {
>                 printk(KERN_CRIT PFX "Unexpected close, not stopping watchdog!\n");
>                 softdog_keepalive();
> 
Now if you do open(), close(), open(), write("V"), close(), the module
becomes unremovable, even without nowayout=1. Isn't is possible to
simply add a softdog_stop() call to watchdog_exit()?

	Arnd <><

[-- Attachment #2: signature --]
[-- Type: application/pgp-signature, Size: 189 bytes --]

  reply	other threads:[~2004-10-11 20:03 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-10-11 17:01 [PATCH] softdog.c (was: Kernel panic after rmmod softdog (2.6.8.1)) Chuck Ebbert
2004-10-11 20:00 ` Arnd Bergmann [this message]
  -- strict thread matches above, loose matches on Subject: below --
2004-10-13 23:55 Chuck Ebbert

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=200410112200.33997.arnd@arndb.de \
    --to=arnd@arndb.de \
    --cc=76306.1226@compuserve.com \
    --cc=joel.becker@oracle.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=schierlm@gmx.de \
    --cc=wim@iguana.be \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox