usb: u_serial: Fix NULL pointer dereference in u_serial tty callbacks
The tty driver data is initialized in gs_open() during port open and
is set to NULL in gs_close() as part of port close. It is possible
that TTY may invoke the registered u_serial tty callback methods after
port is closed. This race between gs_close() and tty callback methods,
leads to NULL pointer dereference.
Fix the issue by adding check for tty driver data in all the u_serial
tty callback methods.
CRs-Fixed: 678702
Change-Id: I9e45f1927f9610fc8567edb8e609a10f19c00017
Signed-off-by:
Saket Saurabh <ssaurabh@codeaurora.org>
Loading
Please register or sign in to comment