From: Alan Cox <alan@lxorguk.ukuu.org.uk>
To: thomas@koeller.dyndns.org
Cc: wim@iguana.be, linux-kernel@vger.kernel.org,
Ralf Baechle <ralf@linux-mips.org>,
linux-mips@linux-mips.org
Subject: Re: [PATCH] Added MIPS RM9K watchdog driver
Date: Fri, 11 Aug 2006 21:07:14 +0100 [thread overview]
Message-ID: <1155326835.24077.116.camel@localhost.localdomain> (raw)
In-Reply-To: <200608102319.13679.thomas@koeller.dyndns.org>
Ar Iau, 2006-08-10 am 23:19 +0200, ysgrifennodd
thomas@koeller.dyndns.org:
> + wd_regs = ioremap_nocache(rr->start, rr->end + 1 - rr->start);
If this fails ?
> + res = misc_register(&miscdev);
> + if (res)
> + iounmap(wd_regs);
> + register_reboot_notifier(&wdt_gpi_shutdown);
> + return res;
Failure path appears incomplete, surely you don't want to register a
reboot notifier then unload and error ?
> + copy_to_user((void __user *)arg, &wdinfo, size);
This function returns an error and should be checked. (The tricks with
IOC bits and verify_area aren't enough to be sure it won't error and
actually probably aren't worth doing)
> + printk(KERN_WARNING "%s: watchdog expired - resetting system\n",
> + wdt_gpi_name);
> +
> + *(volatile char *) flagaddr |= 0x01;
> + *(volatile char *) resetaddr = powercycle ? 0x01 : 0x2;
> + iob();
> + while (1) continue;
cpu_relax();
> +
> + return IRQ_HANDLED;
Unreachable code.
Also if this is a software watchdog why is it better than using
softdog ?
Otherwise it looks pretty sound.
next prev parent reply other threads:[~2006-08-11 19:47 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-08-10 21:19 thomas
2006-08-11 20:07 ` Alan Cox [this message]
2006-08-12 16:06 ` Thomas Koeller
2006-08-12 22:41 ` Ralf Baechle
2006-08-12 17:45 ` Thomas Koeller
2006-08-12 20:43 ` Alan Cox
2006-08-11 20:56 ` Dave Jones
2006-08-11 23:49 ` Thomas Koeller
2006-08-11 22:06 ` Oleg Verych
2006-08-12 0:06 ` Dave Jones
2006-08-12 0:22 ` Ralf Baechle
2006-08-14 14:14 ` Joseph Fannin
2006-08-14 15:30 ` Sam Ravnborg
2006-08-14 16:21 ` Randy.Dunlap
2006-08-14 16:26 ` Dave Jones
2006-08-14 16:27 ` Roland Dreier
2006-08-14 15:50 ` Wim Van Sebroeck
2006-08-14 19:55 ` [PATCH] " Thomas Koeller
2006-08-14 17:25 ` [PATCH] Added " Luca
2006-11-01 18:46 Wim Van Sebroeck
2006-11-01 18:50 ` Ralf Baechle
2006-11-01 19:11 ` Wim Van Sebroeck
2006-11-01 20:43 ` Sam Ravnborg
2006-11-02 6:11 ` Randy Dunlap
2006-11-02 14:04 ` Ralf Baechle
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=1155326835.24077.116.camel@localhost.localdomain \
--to=alan@lxorguk.ukuu.org.uk \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mips@linux-mips.org \
--cc=ralf@linux-mips.org \
--cc=thomas@koeller.dyndns.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
Powered by JetHome