UPSTREAM: usb: gadget: u_serial: Add null pointer check in gs_start_io
If gs_close has cleared port->port.tty and gs_start_io is called afterwards, then the function tty_wakeup will attempt to access the value of the pointer port->port.tty which will cause a null pointer dereference error. To avoid this, add a null pointer check to gs_start_io before attempting to access the value of the pointer port->port.tty. Signed-off-by:Kuen-Han Tsai <khtsai@google.com> Message-ID: <20230602070009.1353946-1-khtsai@google.com> Signed-off-by:
Greg Kroah-Hartman <gregkh@linuxfoundation.org> Bug: 283247551 Bug: 301257472 Bug: 308355601 (cherry picked from commit ffd603f2) Change-Id: I782ef328b0d49810d3fb23c002a86439e6728542 Signed-off-by:
Kuen-Han Tsai <khtsai@google.com> (cherry picked from commit ca0cd377) (cherry picked from commit 2a75568a) (cherry picked from commit 3c5c00dc)
Loading
Please sign in to comment