Skip to content
Commit d74bd3d7 authored by Sjors Hettinga's avatar Sjors Hettinga Committed by Carles Cufí
Browse files

net: tcp: Avoid deadlock in updating the TCP receive window



The function tcp_data_get tries to update the TCP receive window using
net_context_update_recv_wnd. This function graps the context lock while
the tcp_data_get is called from a situation where it already has tcp lock
is already. Transmission actions do first grab the the context lock and
try to grab the tcp lock afterwards. The combination of both can cause a
deadlock.

By taking the shortcut to directly update the tcp receive window without
going through the net context, the context lock is not required avoiding a
possible deadlock situation.

Signed-off-by: default avatarSjors Hettinga <s.a.hettinga@gmail.com>
parent f5679ab7
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment