Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F169028983
D24842.id71799.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
763 B
Referenced Files
None
Subscribers
None
D24842.id71799.diff
View Options
Index: head/sys/kern/uipc_socket.c
===================================================================
--- head/sys/kern/uipc_socket.c
+++ head/sys/kern/uipc_socket.c
@@ -4016,8 +4016,17 @@
{
SOCK_LOCK(so);
- so->so_state &= ~(SS_ISCONNECTING|SS_ISCONNECTED|SS_ISDISCONNECTING);
+
+ /*
+ * There is at least one reader of so_state that does not
+ * acquire socket lock, namely soreceive_generic(). Ensure
+ * that it never sees all flags that track connection status
+ * cleared, by ordering the update with a barrier semantic of
+ * our release thread fence.
+ */
so->so_state |= SS_ISDISCONNECTED;
+ atomic_thread_fence_rel();
+ so->so_state &= ~(SS_ISCONNECTING|SS_ISCONNECTED|SS_ISDISCONNECTING);
if (!SOLISTENING(so)) {
SOCK_UNLOCK(so);
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Tue, Sep 1, 4:15 AM (11 h, 51 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
37710286
Default Alt Text
D24842.id71799.diff (763 B)
Attached To
Mode
D24842: Fix r361037.
Attached
Detach File
Event Timeline
Log In to Comment