You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by xi...@apache.org on 2026/09/07 11:19:16 UTC
(nuttx) 01/02: net/arp: release the device lock before waiting for a resolution
This is an automated email from the ASF dual-hosted git repository.
xiaoxiang781216 pushed a commit to branch releases/13.0
in repository https://gitbox.apache.org/repos/asf/nuttx.git
commit bddf5ae49ac4d8543410b5d21a1390008d1bd088
Author: Felipe Moura <mo...@gmail.com>
AuthorDate: Sun Aug 16 17:28:55 2026 -0300
net/arp: release the device lock before waiting for a resolution
The -EINPROGRESS path jumps over the netdev_unlock() below it, so the
caller waits holding d_lock. The receive path needs that same lock to
dispatch the ARP reply, and the interface stalls for good.
Assisted-by: Claude Code:claude-opus-5
Signed-off-by: Felipe Moura <mo...@gmail.com>
---
net/arp/arp_send.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/net/arp/arp_send.c b/net/arp/arp_send.c
index 5f97a9807b0..01c5e5bb80b 100644
--- a/net/arp/arp_send.c
+++ b/net/arp/arp_send.c
@@ -328,8 +328,13 @@ int arp_send(in_addr_t ipaddr)
{
/* ARP request for the same destination is in progress, directly
* wait arp response notify.
+ *
+ * Drop the device lock: this path skips the netdev_unlock()
+ * below, and the receive path needs that same lock to deliver
+ * the reply. The waiter above is already installed.
*/
+ netdev_unlock(dev);
goto wait;
}