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: <X8oPWJZRbaY8yMOo@localhost>
Date:   Fri, 4 Dec 2020 11:28:40 +0100
From:   Johan Hovold <johan@...nel.org>
To:     Himadri Pandya <himadrispandya@...il.com>
Cc:     johan@...nel.org, gregkh@...uxfoundation.org,
        linux-usb@...r.kernel.org, linux-kernel@...r.kernel.org,
        linux-kernel-mentees@...ts.linuxfoundation.org
Subject: Re: [PATCH 13/15] usb: serial: iuu_phoenix: use
 usb_control_msg_send()

On Wed, Nov 04, 2020 at 12:17:01PM +0530, Himadri Pandya wrote:
> The new usb_control_msg_send() nicely wraps usb_control_msg() with proper
> error check. Hence use the wrapper instead of calling usb_control_msg()
> directly.
> 
> Signed-off-by: Himadri Pandya <himadrispandya@...il.com>
> ---
>  drivers/usb/serial/iuu_phoenix.c | 5 ++---
>  1 file changed, 2 insertions(+), 3 deletions(-)
> 
> diff --git a/drivers/usb/serial/iuu_phoenix.c b/drivers/usb/serial/iuu_phoenix.c
> index b4ba79123d9d..dfbcdcec94e7 100644
> --- a/drivers/usb/serial/iuu_phoenix.c
> +++ b/drivers/usb/serial/iuu_phoenix.c
> @@ -968,9 +968,8 @@ static int iuu_open(struct tty_struct *tty, struct usb_serial_port *port)
>  	priv->poll = 0;
>  
>  #define SOUP(a, b, c, d)  do { \
> -	result = usb_control_msg(port->serial->dev,	\
> -				usb_sndctrlpipe(port->serial->dev, 0),	\
> -				b, a, c, d, NULL, 0, 1000); \
> +	result = usb_control_msg_send(port->serial->dev, 0, b, a, c, d, NULL,\
> +				      0, 1000, GFP_KERNEL);		     \

No need to for this either even if the result was used for anything else
but logging (since there's no data stage).

>  	dev_dbg(dev, "0x%x:0x%x:0x%x:0x%x  %d\n", a, b, c, d, result); } while (0)
>  
>  	/*  This is not UART related but IUU USB driver related or something */

Please drop.

Johan

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ