[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20161210141042.GA19758@kroah.com>
Date: Sat, 10 Dec 2016 15:10:42 +0100
From: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
To: Alexey Khoroshilov <khoroshilov@...ras.ru>
Cc: Jiri Slaby <jslaby@...e.com>, linux-serial@...r.kernel.org,
linux-kernel@...r.kernel.org, ldv-project@...uxtesting.org
Subject: Re: [PATCH] tty: serial: fsl_lpuart: potential NULL dereference
On Sat, Dec 10, 2016 at 01:30:36AM +0300, Alexey Khoroshilov wrote:
> tty_port_tty_get() might return a tty which is NULL
> if the port is not associated with a tty
> (e.g. due to close or hangup).
> But lpuart_start_rx_dma() dereferences tty without any check.
Are you sure that tty could ever be NULL here? This function is only
called in places that seem to have a valid tty, with the maybe exception
of the resume call path. Can you audit this a bit better to be sure one
way or the other please?
thanks,
greg k-h
Powered by blists - more mailing lists