Commit 2a75568a authored by Kuen-Han Tsai's avatar Kuen-Han Tsai
Browse files

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: default avatarKuen-Han Tsai <khtsai@google.com>
Message-ID: <20230602070009.1353946-1-khtsai@google.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>

Bug: 283247551
Bug: 290549186
(cherry picked from commit ffd603f2)
Change-Id: I782ef328b0d49810d3fb23c002a86439e6728542
Signed-off-by: default avatarKuen-Han Tsai <khtsai@google.com>
(cherry picked from commit ca0cd377)
parent 2de42010
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment