From: Tetsuo Handa Date: Wed, 7 May 2008 03:42:27 +0000 (-0700) Subject: serial: access after NULL check in uart_flush_buffer() X-Git-Tag: v2.6.26-rc2~49 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=55d7b68996a5064f011d681bca412b6281d2f711;p=pandora-kernel.git serial: access after NULL check in uart_flush_buffer() I noticed that static void uart_flush_buffer(struct tty_struct *tty) { struct uart_state *state = tty->driver_data; struct uart_port *port = state->port; unsigned long flags; /* * This means you called this function _after_ the port was * closed. No cookie for you. */ if (!state || !state->info) { WARN_ON(1); return; } is too late for checking state != NULL. Signed-off-by: Tetsuo Handa Cc: Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- Reading git-diff-tree failed