mirror of
https://github.com/apache/nuttx.git
synced 2026-05-10 15:30:25 +08:00
27214321be
Move conn_unlock() after the data event handling in can_callback() and udp_callback(). Previously, the connection lock was released immediately after devif_conn_event(), leaving the subsequent can_data_event()/net_dataevent() and read-ahead buffer operations unprotected. This could lead to a race condition where another context modifies the connection state while data is being stored. Hold the lock until the entire callback processing is complete to ensure thread safety. Signed-off-by: zhanghongyu <zhanghongyu@xiaomi.com>