usb: gadget: serial: fix oops when data rx'd after close
When the gadget serial device has no associated TTY, do not pass any received data into the TTY layer for processing; simply drop it instead. This prevents the TTY layer from calling back into the gadget serial driver, which will then crash in e.g. gs_write_room() due to lack of gadget serial device to TTY association (i.e. a NULL pointer dereference). Signed-off-by: NStephen Warren <swarren@nvidia.com> Signed-off-by: NFelipe Balbi <felipe.balbi@linux.intel.com>
Showing
想要评论请 注册 或 登录