Skip to content
Commit f749a052 authored by Jukka Rissanen's avatar Jukka Rissanen Committed by Dan Kalowsky
Browse files

net: if: Release the interface lock early in IPv6 RS timeout handler



The net_if.c:rs_timeout() is sending a new IPv6 router solicitation
message to network by calling net_if_start_rs(). That function will
then acquire iface->lock and call net_ipv6_start_rs() which will try
to send the RS message and acquire TX send lock.
During this RS send, we might receive TCP data that could try to
send an ack to peer. This will then in turn cause also TX lock
to be acquired. Depending on timing, the lock ordering between
rx thread and system workq might mix which could lead to deadlock.
Fix this issue by releasing the iface->lock before starting the
RS sending process. The net_if_start_rs() does not really need to
keep the interface lock for a long time as it is the only one sending
the RS message.

Fixes #86499

Signed-off-by: default avatarJukka Rissanen <jukka.rissanen@nordicsemi.no>
parent 3af878f6
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment