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
| ||
|
Date: Wed, 26 Sep 2007 23:12:05 +0100 From: Alan Cox <alan@...rguk.ukuu.org.uk> To: greg@...ah.com, akpm@...l.org, linux-kernel@...r.kernel.org Subject: [PATCH] usb serial: Kill another case we pass NULL and shouldn't Signed-off-by: Alan Cox <alan@...hat.com> diff -u --new-file --exclude-from /usr/src/exclude --recursive linux.vanilla-2.6.23rc8-mm1/drivers/usb/serial/console.c linux-2.6.23rc8-mm1/drivers/usb/serial/console.c --- linux.vanilla-2.6.23rc8-mm1/drivers/usb/serial/console.c 2007-09-26 16:41:47.000000000 +0100 +++ linux-2.6.23rc8-mm1/drivers/usb/serial/console.c 2007-09-18 16:30:08.000000000 +0100 @@ -164,6 +164,7 @@ } if (serial->type->set_termios) { + struct ktermios dummy; /* build up a fake tty structure so that the open call has something * to look at to get the cflag value */ tty = kzalloc(sizeof(*tty), GFP_KERNEL); @@ -177,12 +178,13 @@ kfree (tty); return -ENOMEM; } + memset(&dummy, 0, sizeof(struct ktermios)); termios->c_cflag = cflag; tty->termios = termios; port->tty = tty; /* set up the initial termios settings */ - serial->type->set_termios(port, NULL); + serial->type->set_termios(port, &dummy); port->tty = NULL; kfree (termios); kfree (tty); - 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