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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Mon, 11 Jul 2011 23:32:51 +0200
From:	Wolfram Sang <w.sang@...gutronix.de>
To:	Wim Van Sebroeck <wim@...ana.be>
Cc:	LKML <linux-kernel@...r.kernel.org>,
	Linux Watchdog Mailing List <linux-watchdog@...r.kernel.org>,
	Alan Cox <alan@...rguk.ukuu.org.uk>
Subject: Re: [PATCH 02/11] watchdog: WatchDog Timer Driver Core - Add basic
 ioctl functionality

> +static long watchdog_ioctl(struct file *file, unsigned int cmd,
> +							unsigned long arg)
> +{
> +	void __user *argp = (void __user *)arg;
> +	int __user *p = argp;
> +	unsigned int val;
> +
> +	switch (cmd) {
> +	case WDIOC_GETSUPPORT:
> +		return copy_to_user(argp, wdd->info,
> +			sizeof(struct watchdog_info)) ? -EFAULT : 0;
> +	case WDIOC_GETSTATUS:
> +		val = wdd->ops->status ? wdd->ops->status(wdd) : 0;
> +		return put_user(val, p);
> +	case WDIOC_GETBOOTSTATUS:
> +		return put_user(wdd->bootstatus, p);
> +	default:
> +		return -ENOTTY;
> +	}
> +	return -ENOTTY;

I think one of the -ENOTTY could be removed?

-- 
Pengutronix e.K.                           | Wolfram Sang                |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |

Download attachment "signature.asc" of type "application/pgp-signature" (199 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ