From a4134da2b2b2917fe516a5fd396b6330656c181a Mon Sep 17 00:00:00 2001 From: Matthew Macy Date: Mon, 25 Jan 2021 11:18:28 -0800 Subject: [PATCH] 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 Signed-off-by: Matt Macy Closes #11512 --- module/os/linux/spl/spl-taskq.c | 1 + 1 file changed, 1 insertion(+) diff --git a/module/os/linux/spl/spl-taskq.c b/module/os/linux/spl/spl-taskq.c index e8d89bfeab..a63c34748b 100644 --- a/module/os/linux/spl/spl-taskq.c +++ b/module/os/linux/spl/spl-taskq.c @@ -995,6 +995,7 @@ error: spin_unlock_irqrestore(&tq->tq_lock, flags); tsd_set(taskq_tsd, NULL); + thread_exit(); return (0); }