Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F137340417
D1805.id3694.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
D1805.id3694.diff
View Options
Index: sys/kern/uipc_socket.c
===================================================================
--- sys/kern/uipc_socket.c
+++ sys/kern/uipc_socket.c
@@ -3439,11 +3439,9 @@
SOCKBUF_LOCK(&so->so_rcv);
so->so_state &= ~SS_ISCONNECTING;
so->so_state |= SS_ISDISCONNECTING;
- so->so_rcv.sb_state |= SBS_CANTRCVMORE;
- sorwakeup_locked(so);
+ socantrcvmore_locked(so);
SOCKBUF_LOCK(&so->so_snd);
- so->so_snd.sb_state |= SBS_CANTSENDMORE;
- sowwakeup_locked(so);
+ socantsendmore(so);
wakeup(&so->so_timeo);
}
@@ -3458,9 +3456,14 @@
SOCKBUF_LOCK(&so->so_rcv);
so->so_state &= ~(SS_ISCONNECTING|SS_ISCONNECTED|SS_ISDISCONNECTING);
so->so_state |= SS_ISDISCONNECTED;
- so->so_rcv.sb_state |= SBS_CANTRCVMORE;
- sorwakeup_locked(so);
+ socantrcvmore_locked(so);
SOCKBUF_LOCK(&so->so_snd);
+
+ /*
+ * XXX: This should use socantsendmore() but it's unclear if
+ * the call to sbdrop_locked() can be moved without opening
+ * a race.
+ */
so->so_snd.sb_state |= SBS_CANTSENDMORE;
sbdrop_locked(&so->so_snd, sbused(&so->so_snd));
sowwakeup_locked(so);
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sun, Nov 23, 3:09 PM (7 h, 34 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
26019305
Default Alt Text
D1805.id3694.diff (1 KB)
Attached To
Mode
D1805: [sockbuf] Don't access fields directly, use accessor functions
Attached
Detach File
Event Timeline
Log In to Comment