Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F107187720
D20539.id58322.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
914 B
Referenced Files
None
Subscribers
None
D20539.id58322.diff
View Options
Index: sys/dev/cxgbe/tom/t4_cpl_io.c
===================================================================
--- sys/dev/cxgbe/tom/t4_cpl_io.c
+++ sys/dev/cxgbe/tom/t4_cpl_io.c
@@ -2211,6 +2211,7 @@
}
toep->aiotx_task_active = false;
SOCKBUF_UNLOCK(&so->so_snd);
+ wakeup(&toep->aiotx_task_active);
CURVNET_RESTORE();
free_toepcb(toep);
@@ -2248,8 +2249,20 @@
sb = &so->so_snd;
SOCKBUF_LOCK(sb);
- if (!aio_cancel_cleared(job))
+ if (!aio_cancel_cleared(job)) {
TAILQ_REMOVE(&toep->aiotx_jobq, job, list);
+
+ /*
+ * Wait for any pending task to run if the jobq is now
+ * empty as this job is holding the reference to the
+ * socket that the task is depending on.
+ */
+ if (TAILQ_EMPTY(&toep->aiotx_jobq)) {
+ while (toep->aiotx_task_active)
+ mtx_sleep(&toep->aiotx_task_active,
+ SOCKBUF_MTX(sb), 0, "aiotxcan", 0);
+ }
+ }
SOCKBUF_UNLOCK(sb);
ab = job->backend1;
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sun, Jan 12, 9:42 AM (20 h, 58 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
15766824
Default Alt Text
D20539.id58322.diff (914 B)
Attached To
Mode
D20539: Hold an explicit reference on the socket for the aiotx task.
Attached
Detach File
Event Timeline
Log In to Comment