Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F154743412
D49437.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
D49437.diff
View Options
diff --git a/sys/kern/uipc_socket.c b/sys/kern/uipc_socket.c
--- a/sys/kern/uipc_socket.c
+++ b/sys/kern/uipc_socket.c
@@ -592,11 +592,6 @@
/*
* Transfer data from the source to the sink.
- *
- * If "direct" is true, the transfer is done in the context of whichever thread
- * is operating on one of the socket buffers. We do not know which locks are
- * held, so we can only trylock the socket buffers; if this fails, we fall back
- * to the worker thread, which invokes this routine with "direct" set to false.
*/
static void
so_splice_xfer(struct so_splice *sp)
@@ -1638,7 +1633,7 @@
sp->wq_index = atomic_fetchadd_32(&splice_index, 1) %
(mp_maxid + 1);
} while (CPU_ABSENT(sp->wq_index));
- sp->state = SPLICE_IDLE;
+ sp->state = SPLICE_INIT;
TIMEOUT_TASK_INIT(taskqueue_thread, &sp->timeout, 0, so_splice_timeout,
sp);
return (sp);
diff --git a/sys/sys/socketvar.h b/sys/sys/socketvar.h
--- a/sys/sys/socketvar.h
+++ b/sys/sys/socketvar.h
@@ -80,6 +80,7 @@
struct mtx mtx;
unsigned int wq_index;
enum so_splice_state {
+ SPLICE_INIT, /* embryonic state, don't queue work yet */
SPLICE_IDLE, /* waiting for work to arrive */
SPLICE_QUEUED, /* a wakeup has queued some work */
SPLICE_RUNNING, /* currently transferring data */
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Thu, Apr 30, 8:49 AM (2 h, 57 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
32376749
Default Alt Text
D49437.diff (1 KB)
Attached To
Mode
D49437: socket: Fix a race in the SO_SPLICE state machine
Attached
Detach File
Event Timeline
Log In to Comment