lkml.org 
[lkml]   [2016]   [Dec]   [10]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [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

\
 
 \ /
  Last update: 2016-12-10 15:11    [W:0.027 / U:2.824 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site