Skip to content
Commit 03e1872d authored by Jukka Rissanen's avatar Jukka Rissanen Committed by Kumar Gala
Browse files

net: tcp: Change locking order in connection establishment



When application calls TCP connect(), the call is blocked
by a semaphore which is then released when the connection
is established. Unfortunately the semaphore release was done
before the connection was marked as established. Depending
on the configuration options set, it is possible that after
the semaphore release, the thread that is waiting on connect()
is run immediately. Because of this, the connection bookeeping
still thought that the connection was not established even if
it was. A simple solution is to release the semaphore after
the connection is marked as established.

Fixes #35390

Signed-off-by: default avatarJukka Rissanen <jukka.rissanen@linux.intel.com>
parent 3851a14f
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment