public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Mike Waychison <mikew@google.com>
To: Wim Van Sebroeck <wim@iguana.be>
Cc: LKML <linux-kernel@vger.kernel.org>,
	Linux Watchdog Mailing List <linux-watchdog@vger.kernel.org>,
	Alan Cox <alan@lxorguk.ukuu.org.uk>
Subject: Re: [RFC] [PATCH 6/10] Generic Watchdog Timer Driver
Date: Wed, 23 Feb 2011 14:06:42 -0800	[thread overview]
Message-ID: <4D6584F2.1010109@google.com> (raw)
In-Reply-To: <20110223204350.GA7433@infomag.iguana.be>

On 02/23/11 12:43, Wim Van Sebroeck wrote:
> commit afe3de93859443b575407f39a2e655956c02e088
> Author: Wim Van Sebroeck<wim@iguana.be>
> Date:   Sun Jul 18 10:39:00 2010 +0000
>
>      watchdog: WatchDog Timer Driver Core - Part 6
>
>      Since we don't want that a driver module can be removed
>      while the watchdog timer is still active, we lock the
>      driver module (by incremeting the reference counter).
>      After a clean close of the watchdog driver we unlock the
>      driver module.
>      If /dev/watchdog is closed uncleanly (and the watchdog is
>      still active) then we do not unlock the driver module,
>      but keep it, so that next time /dev/watchdog get's opened
>      we can continue triggering the watchdog.
>
>      Signed-off-by: Alan Cox<alan@lxorguk.ukuu.org.uk>
>      Signed-off-by: Wim Van Sebroeck<wim@iguana.be>
>

*snip*

> diff --git a/drivers/watchdog/core/watchdog_core.c b/drivers/watchdog/core/watchdog_core.c
> index 52bc520..d1a824e 100644
> --- a/drivers/watchdog/core/watchdog_core.c
> +++ b/drivers/watchdog/core/watchdog_core.c
> @@ -60,6 +60,10 @@ int register_watchdogdevice(struct watchdog_device *wdd)
>   	if (wdd == NULL || wdd->info == NULL || wdd->ops == NULL)
>   		return -ENODATA;
>
> +	/* Make sure that the owner of the watchdog operations exists */
> +	if (wdd->ops->owner == NULL)
> +		return -ENODATA;

This check is invalid when the driver is built in.

  reply	other threads:[~2011-02-23 22:06 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-02-23 20:43 [RFC] [PATCH 6/10] Generic Watchdog Timer Driver Wim Van Sebroeck
2011-02-23 22:06 ` Mike Waychison [this message]
2011-03-03 10:33   ` Wim Van Sebroeck
2011-02-24 10:02 ` Jamie Iles
2011-03-03 10:44   ` Wim Van Sebroeck

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=4D6584F2.1010109@google.com \
    --to=mikew@google.com \
    --cc=alan@lxorguk.ukuu.org.uk \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-watchdog@vger.kernel.org \
    --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