Gitweb: http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=e58679805dab3fb75df88141d9d869904a93337f Commit: e58679805dab3fb75df88141d9d869904a93337f Parent: e7b13ec9235b9fded90f826ceeb8c34548631351 Author: Oliver Neukum <[EMAIL PROTECTED]> AuthorDate: Thu Dec 20 12:23:03 2007 +0100 Committer: Greg Kroah-Hartman <[EMAIL PROTECTED]> CommitDate: Fri Feb 1 14:34:58 2008 -0800
USB: fix NULL pointer dereference on drivers/usb/serial/whiteheat.c Am Sonntag, 16. Dezember 2007 05:23:47 schrieb Andrew Morton: > On Sat, 15 Dec 2007 07:08:52 -0800 (PST) [EMAIL PROTECTED] wrote: > > > http://bugzilla.kernel.org/show_bug.cgi?id=9573 > > There's a null pointer dereference on drivers/usb/serial/whiteheat.c as > > follows: > > > > (1) line 613: the test "if (port->tty)" implies that null is a legal value > > for "port->tty" at that point > > > > (2) neither firm_open nor firm_purge initialize "port->tty" drivers/usb/serial/usb-serial::serial_open() sets port->tty The check for NULL is bogus. This patch removes the check. Signed-off-by: Oliver Neukum <[EMAIL PROTECTED]> Acked-by: Alan Cox <[EMAIL PROTECTED]> Signed-off-by: Greg Kroah-Hartman <[EMAIL PROTECTED]> --- drivers/usb/serial/whiteheat.c | 3 +-- 1 files changed, 1 insertions(+), 2 deletions(-) diff --git a/drivers/usb/serial/whiteheat.c b/drivers/usb/serial/whiteheat.c index ee5dd8b..f5033d4 100644 --- a/drivers/usb/serial/whiteheat.c +++ b/drivers/usb/serial/whiteheat.c @@ -610,8 +610,7 @@ static int whiteheat_open (struct usb_serial_port *port, struct file *filp) if (retval) goto exit; - if (port->tty) - port->tty->low_latency = 1; + port->tty->low_latency = 1; /* send an open port command */ retval = firm_open(port); - To unsubscribe from this list: send the line "unsubscribe git-commits-head" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html