spl-taskq: Make sure thread tsd hash entry is cleared

Like any other thread created by thread_create() we need to call
thread_exit() to properly clean it up.  In particular, this ensures the
tsd hash for the thread is cleared.

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Matt Macy <mmacy@FreeBSD.org>
Closes #11512
This commit is contained in:
Matthew Macy
2021-01-25 11:18:28 -08:00
committed by GitHub
parent fd95af8dd4
commit a4134da2b2
+1
View File
@@ -995,6 +995,7 @@ error:
spin_unlock_irqrestore(&tq->tq_lock, flags);
tsd_set(taskq_tsd, NULL);
thread_exit();
return (0);
}