nuttx/net/udp
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
..
CMakeLists.txt net: migrate to SPDX identifier 2024-09-12 01:08:11 +08:00
Kconfig net: Enable dynamic allocation of tcp/udp/ipfwd buffer by default 2025-01-07 22:00:21 +08:00
Make.defs net: migrate to SPDX identifier 2024-09-12 01:08:11 +08:00
udp.h net/devif_callback: change flags type from uint16_t to uint32_t 2026-01-02 00:04:16 +08:00
udp_callback.c net/can,udp: fix conn unlock position in callback 2026-04-02 20:55:27 +08:00
udp_close.c net/udp: remove net_lock 2025-12-29 09:42:18 +08:00
udp_conn.c net: change conn lock from mutex to rmutex 2025-12-29 09:42:18 +08:00
udp_devpoll.c net/udp: Support zero-length UDP datagrams 2025-12-27 20:38:47 +08:00
udp_finddev.c net: migrate to SPDX identifier 2024-09-12 01:08:11 +08:00
udp_input.c net/netdev: modify for hardware checksum offload 2026-01-19 23:22:46 +08:00
udp_ioctl.c net/udp: remove net_lock 2025-12-29 09:42:18 +08:00
udp_ipselect.c net: migrate to SPDX identifier 2024-09-12 01:08:11 +08:00
udp_netpoll.c net/devif_callback: change flags type from uint16_t to uint32_t 2026-01-02 00:04:16 +08:00
udp_notifier.c udp:Resolve UDP exit delay due to high CPU usage 2025-12-29 09:42:18 +08:00
udp_recvfrom.c net: replace net_sem*wait with conn_dev_sem*wait to simplify code logic 2026-01-02 07:48:06 -03:00
udp_send.c net: skip TCP/UDP pseudo-header checksum with hardware offload 2026-01-19 23:22:46 +08:00
udp_sendto_buffered.c style: Fix "the the" typo across the codebase. 2026-03-23 11:07:49 +01:00
udp_sendto_unbuffered.c style: Fix "the the" typo across the codebase. 2026-03-23 11:07:49 +01:00
udp_setsockopt.c net: migrate to SPDX identifier 2024-09-12 01:08:11 +08:00
udp_txdrain.c net: replace net_sem*wait with conn_dev_sem*wait to simplify code logic 2026-01-02 07:48:06 -03:00
udp_wrbuffer.c Revert "net: limit TCP and UDP send/recv buffer usage with throttled IOB" 2026-01-23 14:40:06 -03:00
udp_wrbuffer_dump.c net: migrate to SPDX identifier 2024-09-12 01:08:11 +08:00