Re: [PATCH] pcmcia: synclink_cs: fix potential tty NULL dereference

From: Alan Cox
Date: Fri Sep 14 2012 - 06:44:27 EST

On Fri, 14 Sep 2012 01:30:06 +0400
Alexey Khoroshilov <khoroshilov@xxxxxxxxx> wrote:

> tty_port_tty_get() can return NULL after port hangup that may happen anytime.
> The patch adds checks that tty_port_tty_get() returns nonNULL around places
> where tty is actually used.

I don't believe you can simply skip the processing in this case howevver
on the rx side. You are no longer reading the state, draining the FIFO
etc. Have you tested this on actual hardware and faked the tty = NULL
case ?

The tx one looks better.

To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at
Please read the FAQ at