https://github.com/torvalds/linux
Revision 55d7b68996a5064f011d681bca412b6281d2f711 authored by Tetsuo Handa on 07 May 2008, 03:42:27 UTC, committed by Linus Torvalds on 08 May 2008, 17:46:55 UTC
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 <penguin-kernel@I-love.SAKURA.ne.jp>
Cc: <stable@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
1 parent 3f9827b
History
Tip revision: 55d7b68996a5064f011d681bca412b6281d2f711 authored by Tetsuo Handa on 07 May 2008, 03:42:27 UTC
serial: access after NULL check in uart_flush_buffer()
Tip revision: 55d7b68
File Mode Size
Documentation
arch
block
crypto
drivers
fs
include
init
ipc
kernel
lib
mm
net
samples
scripts
security
sound
usr
virt
.gitignore -rw-r--r-- 682 bytes
.mailmap -rw-r--r-- 3.6 KB
COPYING -rw-r--r-- 18.3 KB
CREDITS -rw-r--r-- 90.5 KB
Kbuild -rw-r--r-- 2.4 KB
MAINTAINERS -rw-r--r-- 97.0 KB
Makefile -rw-r--r-- 53.7 KB
README -rw-r--r-- 16.5 KB
REPORTING-BUGS -rw-r--r-- 3.1 KB

README

back to top