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]
Message-ID: <20111205113424.6225ddcb@lxorguk.ukuu.org.uk>
Date:	Mon, 5 Dec 2011 11:34:24 +0000
From:	Alan Cox <alan@...rguk.ukuu.org.uk>
To:	wangyanqing <udknight@...il.com>
Cc:	gregkh@...e.de, amworsley@...il.com, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] drivers:usb:serial:ftdi_sio.c: ftdi_set_termios make no
 sense some in a situation

On Mon, 5 Dec 2011 15:47:30 +0800
wangyanqing <udknight@...il.com> wrote:

> b1ffb4c851f185e9051ba837c16d9b84ef688d26 make a improvement to drop no sense reset
> termios. But it miss the situation, when call ftdi_set_termios with the value that
> same with the default settings all the time, then termios will take no effect any way,
> we need usb_control_msg to make effect. This patch try to resolve this question.
> 
> Signed-off-by: Wang YanQing <ukdnight@...il.com>
> ---
>  drivers/usb/serial/ftdi_sio.c |   10 ++++++++--
>  1 files changed, 8 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/usb/serial/ftdi_sio.c b/drivers/usb/serial/ftdi_sio.c
> index 486769c..61f1be4 100644
> --- a/drivers/usb/serial/ftdi_sio.c
> +++ b/drivers/usb/serial/ftdi_sio.c
> @@ -2056,6 +2056,7 @@ static void ftdi_set_termios(struct tty_struct *tty,
>  	struct ktermios *termios = tty->termios;
>  	unsigned int cflag = termios->c_cflag;
>  	__u16 urb_value; /* will hold the new flags */
> +	static int init_once = 1;

NACK

Think about what happens if you have two such ports or remove and re-add
it.

What code path is calling set_termios passing a termios data which has
never been set ?

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