mirror of
https://github.com/apache/nuttx.git
synced 2026-09-09 10:26:37 +00:00
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 <moura.fmo@gmail.com>
This commit is contained in:
parent
94703f50ad
commit
b6583cc4b6
1 changed files with 5 additions and 0 deletions
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue