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] [day] [month] [year] [list]
Date:   Tue, 9 Jan 2018 12:57:48 +0100
From:   Johan Hovold <johan@...nel.org>
To:     Mikhail Zaytsev <flashed@...l.ru>
Cc:     Johan Hovold <johan@...nel.org>,
        Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
        linux-usb@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH v2 2/2] USB: serial: ark3116: Move TIOCGSERIAL ioctl case
 to function.

On Sat, Jan 06, 2018 at 08:15:22PM +0300, Mikhail Zaytsev wrote:
> The patch moves TIOCGSERIAL ioctl case to get_serial_info function.
> 
> Signed-off-by: Mikhail Zaytsev <flashed@...l.ru>

>  static int ark3116_ioctl(struct tty_struct *tty,
>  			 unsigned int cmd, unsigned long arg)
>  {
>  	struct usb_serial_port *port = tty->driver_data;
> -	struct serial_struct serstruct;
> -	void __user *user_arg = (void __user *)arg;

I prefer keeping this pointer here to avoid adding casts to every helper
function call, so I added it back before applying.

>  
>  	switch (cmd) {
>  	case TIOCGSERIAL:

> +		return ark3116_get_serial_info(port,
> +					(struct serial_struct __user *)arg);

Thanks,
Johan

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ