lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20110503103704.69aba5b2@lxorguk.ukuu.org.uk>
Date:	Tue, 3 May 2011 10:37:04 +0100
From:	Alan Cox <alan@...rguk.ukuu.org.uk>
To:	Jimmy Chen (陳永達) <jimmy.chen@...a.com>
Cc:	<linux-kernel@...r.kernel.org>, <linux-watchdog@...r.kernel.org>,
	<wim@...ana.be>
Subject: Re: [PATCH 2/2] watchdog: add support for MOXA V2100 watchdog
 driver

> Add real function for watchdog driver

Looks a lot better

> +#define __KERNEL_SYSCALLS__
> +

You shouldn't need that define now


> +	/* we suppose to check magic id in case wrong devices */
> +	if (wdt_verify_vendor()) {
> +		printk(KERN_ERR "hw device id not match!!\n");
> +		ret = -ENODEV;
> +		goto reqreg_err;
> +	}

This wants to happen after the request_region - if the region is busy
then you know your device isn't present but that the addresses in
question are currently in use so you shouldn't touch them

We tend to use pr_err()/pr_debug() etc now rather than printk(KERN_ERR
"Oops"); to be less long winded - but the code you have there isn't wrong
in using printk().

With the tests re-ordered this looks fairly sound to me

Alan
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ