Skip to content

Conversation

@rlubos
Copy link
Contributor

@rlubos rlubos commented Dec 14, 2023

In case one of the networking shell backends is enabled, net arp command could potentially trigger a deadlock, as it locks the ARP mutex before TCP connection mutex, while TCP stack could do this in reverse order (for instance when sending ACK or retransmission).

Mitigate this, by forcing a separate TX thread in such case, so that ARP mutex is no longer accessed with TCP mutex locked.

The PR is an outcome of a discussion in #66287 (comment)

In case one of the networking shell backends is enabled, net arp command
could potentially trigger a deadlock, as it locks the ARP mutex before
TCP connection mutex, while TCP stack could do this in reverse order
(for instance when sending ACK or retransmission).

Mitigate this, by forcing a separate TX thread in such case, so that ARP
mutex is no longer accessed with TCP mutex locked.

Signed-off-by: Robert Lubos <[email protected]>
@fabiobaltieri fabiobaltieri merged commit 0c09589 into zephyrproject-rtos:main Dec 15, 2023
@rlubos rlubos deleted the net/fix-arp-shell-deadlock branch December 20, 2023 14:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants