Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F144385872
D35730.id107830.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
900 B
Referenced Files
None
Subscribers
None
D35730.id107830.diff
View Options
diff --git a/sys/netinet/tcp_syncache.c b/sys/netinet/tcp_syncache.c
--- a/sys/netinet/tcp_syncache.c
+++ b/sys/netinet/tcp_syncache.c
@@ -828,8 +828,8 @@
#endif
inp = sotoinpcb(so);
+ INP_WLOCK_ASSERT(inp);
inp->inp_inc.inc_fibnum = so->so_fibnum;
- INP_WLOCK(inp);
/*
* Exclusive pcbinfo lock is not required in syncache socket case even
* if two inpcb locks can be acquired simultaneously:
diff --git a/sys/netinet/tcp_usrreq.c b/sys/netinet/tcp_usrreq.c
--- a/sys/netinet/tcp_usrreq.c
+++ b/sys/netinet/tcp_usrreq.c
@@ -202,7 +202,13 @@
goto out;
}
tp->t_state = TCPS_CLOSED;
- INP_WUNLOCK(inp);
+ /*
+ * Unlock the inp when being called from so_create(), but do not
+ * when being called from sonewconn().
+ * sonewconn() expects the inp to be locked.
+ */
+ if (so->so_listen == NULL)
+ INP_WUNLOCK(inp);
TCPSTATES_INC(TCPS_CLOSED);
out:
TCPDEBUG2(PRU_ATTACH);
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Mon, Feb 9, 4:26 AM (9 h, 25 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
28536825
Default Alt Text
D35730.id107830.diff (900 B)
Attached To
Mode
D35730: tcp: keep the inp locked while processing the ACK of the handshake
Attached
Detach File
Event Timeline
Log In to Comment