Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
drivers/usbdev/cdcacm.c: Fix a crash in cdcacm if usbdev gets unregis…
…tered while client calls close for the tty Make sure that the cdcacm is disconnected before the usbdev gets unregistered. Also, check if the device is connected or not in cdcuart_txempty (uart_txempty). Otherwise there may be a crash during uart_tcdrain, called in tty close path, if the usbdev unregistration happens during the loop. This issue can be triggered by monitoring the cable connection status in one thread, sending BOARDIOC_USBDEV_DISCONNECT if the usb cable is detached. In another thread close the ttyACM. Signed-off-by: Jukka Laitinen <[email protected]>
- Loading branch information