Re: [PATCH] workqueue: Fix UAF report by KASAN in pwq_release_workfn()

From: Tejun Heo
Date: Wed Sep 06 2023 - 13:01:36 EST


On Wed, Sep 06, 2023 at 10:12:34AM +0800, Z qiang wrote:
> Flush the pwq_release_worker is insufficient, the call_rcu() is
> invoked to release wq
> in pwq_release_workfn(), this is also asynchronous.

But rcu_free_pwq() doesn't access wq or anything. The last access is from
the work function.

Thanks.

--
tejun