raiden00pl opened a new pull request, #21946:
URL: https://github.com/apache/nuttx/pull/21946
## Summary
Since #21893, the backlog path of tcp_accept_connection() unlocks
listener->sconn twice: once after tcp_backlogadd() (aa3401b7a4f) and
again after tcp_callback() (18960c228c6). Every connection that is put
in the backlog hits DEBUGASSERT(rmutex->count > 0) in nxrmutex_unlock()
(libs/libc/misc/lib_mutex.c:486).
This removes the unlock after tcp_backlogadd(), so the lock is held
across tcp_callback() and released once, as 18960c228c6 intended.
## Impact
Fixes the assertion on every backlogged TCP connection, for example a
server that is not blocked in accept() when the client connects.
## Testing
- sim: a TCP server with a backlog crashed with the assertion on the
first connection before the change; after the change, TCP accept,
backlog overflow, half-close and Modbus TCP server tests pass.
- qemu-armv8a: the TCP backlog overflow test passes.
--
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]