From: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
To: Jan Beulich <JBeulich@suse.com>, wim@iguana.be
Cc: wim@iguana.be, xen-devel <xen-devel@lists.xen.org>,
linux-watchdog@vger.kernel.org
Subject: Re: [PATCH] watchdog/xen: don't clear is_active when xen_wdt_stop() failed
Date: Wed, 21 Mar 2012 13:23:57 -0400 [thread overview]
Message-ID: <20120321172357.GB5923@phenom.dumpdata.com> (raw)
In-Reply-To: <4F670B3C020000780007935F@nat28.tlf.novell.com>
On Mon, Mar 19, 2012 at 09:32:28AM +0000, Jan Beulich wrote:
> xen_wdt_release() shouldn't clear is_active even when the watchdog
> didn't get stopped (which by itself shouldn't happen, but let's return
> a proper error in this case rather than adding a BUG() upon hypercall
> failure).
>
> Signed-off-by: Jan Beulich <jbeulich@suse.com>
Looks good to me too. Wim, want me to carry it for 3.4?
>
> ---
> drivers/watchdog/xen_wdt.c | 8 +++++---
> 1 file changed, 5 insertions(+), 3 deletions(-)
>
> --- 3.3/drivers/watchdog/xen_wdt.c
> +++ 3.3-xen-watchdog-release/drivers/watchdog/xen_wdt.c
> @@ -131,16 +131,18 @@ static int xen_wdt_open(struct inode *in
>
> static int xen_wdt_release(struct inode *inode, struct file *file)
> {
> + int err = 0;
> +
> if (expect_release)
> - xen_wdt_stop();
> + err = xen_wdt_stop();
> else {
> printk(KERN_CRIT PFX
> "unexpected close, not stopping watchdog!\n");
> xen_wdt_kick();
> }
> - is_active = false;
> + is_active = err;
> expect_release = false;
> - return 0;
> + return err;
> }
>
> static ssize_t xen_wdt_write(struct file *file, const char __user *data,
>
>
next prev parent reply other threads:[~2012-03-21 17:28 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-03-19 9:32 [PATCH] watchdog/xen: don't clear is_active when xen_wdt_stop() failed Jan Beulich
2012-03-21 17:23 ` Konrad Rzeszutek Wilk [this message]
2012-03-21 19:50 ` Wim Van Sebroeck
2012-03-22 8:13 ` Jan Beulich
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=20120321172357.GB5923@phenom.dumpdata.com \
--to=konrad.wilk@oracle.com \
--cc=JBeulich@suse.com \
--cc=linux-watchdog@vger.kernel.org \
--cc=wim@iguana.be \
--cc=xen-devel@lists.xen.org \
/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