jerpelea opened a new pull request, #19610: URL: https://github.com/apache/nuttx/pull/19610
## Summary uart_putxmitchar() manipulates dev->xmit.head/buffer directly with no internal locking - every other caller (uart_write()) takes dev->xmit.lock first. uart_readv()'s ECHO handling (both the backspace/delete erase sequence and the normal character echo) calls uart_putxmitchar() without taking that lock, so a concurrent uart_write() and a local echo can race on the same circular buffer state, corrupting it. Take dev->xmit.lock around each echo's uart_putxmitchar() calls, matching what uart_write() already does. uart_readv() holds dev->recv.lock for its own duration, but no other code path ever acquires recv.lock while holding xmit.lock, so nesting xmit.lock inside the existing recv.lock scope here doesn't introduce a new lock-ordering cycle. Fixes #14845 ## Impact RELEASE ## Testing CI -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
