nuttx/net/can
zhanghongyu 27214321be net/can,udp: fix conn unlock position in callback
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>
2026-04-02 20:55:27 +08:00
..
can.h net: make the sendmsg param type consistent with posix specification 2026-01-16 21:11:39 +08:00
can_bufpool.c net/can: can protocol uses a separate buffer to cache can data 2025-12-25 08:56:12 -03:00
can_callback.c net/can,udp: fix conn unlock position in callback 2026-04-02 20:55:27 +08:00
can_conn.c net: change conn lock from mutex to rmutex 2025-12-29 09:42:18 +08:00
can_getsockopt.c net/can: can protocol uses a separate buffer to cache can data 2025-12-25 08:56:12 -03:00
can_input.c net/devif_callback: change flags type from uint16_t to uint32_t 2026-01-02 00:04:16 +08:00
can_notifier.c net: migrate to SPDX identifier 2024-09-12 01:08:11 +08:00
can_poll.c net: migrate to SPDX identifier 2024-09-12 01:08:11 +08:00
can_recvmsg.c net: replace net_sem*wait with conn_dev_sem*wait to simplify code logic 2026-01-02 07:48:06 -03:00
can_sendmsg.c net: make the sendmsg param type consistent with posix specification 2026-01-16 21:11:39 +08:00
can_sendmsg_buffered.c can_sendmsg_buffered: fix can_sendmsg param type mismatch error 2026-01-16 21:11:39 +08:00
can_setsockopt.c net/can: allow errmask to be set to CAN_ERR_FLAG; 2026-01-19 15:13:14 +08:00
can_sockif.c net/devif_callback: change flags type from uint16_t to uint32_t 2026-01-02 00:04:16 +08:00
CMakeLists.txt net/can: can protocol uses a separate buffer to cache can data 2025-12-25 08:56:12 -03:00
Kconfig net/can: fix poll setup to properly find and use free pollfd slots 2025-12-31 02:35:42 +08:00
Make.defs net/can: can protocol uses a separate buffer to cache can data 2025-12-25 08:56:12 -03:00