workqueue: Fix missing kfree(rescuer) in destroy_workqueue()
authorTejun Heo <tj@kernel.org>
Fri, 20 Sep 2019 20:39:57 +0000 (13:39 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 17 Dec 2019 19:39:59 +0000 (20:39 +0100)
commit 8efe1223d73c218ce7e8b2e0e9aadb974b582d7f upstream.

Signed-off-by: Tejun Heo <tj@kernel.org>
Reported-by: Qian Cai <cai@lca.pw>
Fixes: def98c84b6cd ("workqueue: Fix spurious sanity check failures in destroy_workqueue()")
Cc: Nobuhiro Iwamatsu <nobuhiro1.iwamatsu@toshiba.co.jp>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
kernel/workqueue.c

index 183ddc34fd54bc687151d35588db09ccaa30aa4e..a37f5dc7cb39cf92cf088b65c6fe3564a1900704 100644 (file)
@@ -4110,6 +4110,7 @@ void destroy_workqueue(struct workqueue_struct *wq)
 
                /* rescuer will empty maydays list before exiting */
                kthread_stop(rescuer->task);
+               kfree(rescuer);
        }
 
        /* sanity checks */