Page MenuHomeFreeBSD

D20539.id58322.diff
No OneTemporary

D20539.id58322.diff

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

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)

Event Timeline