Re: åå: [PATCH v5] workqueue: Remove unnecessary kfree() call in rcu_free_wq()

From: Tejun Heo
Date: Thu May 28 2020 - 10:04:18 EST


Hello,

On Thu, May 28, 2020 at 09:27:03PM +0800, Lai Jiangshan wrote:
> wq owns the ultimate or permanent references to itself by
> owning references to wq->numa_pwq_tbl[node], wq->dfl_pwq.
> The pwq's references keep the pwq in wq->pwqs.

Yeah, regardless of who puts a wq the last time, the base reference is put
by destroy_workqueue() and thus it's guaranteed that a wq can't be rcu freed
without going through destroy_workqueue(). lol I'm undoing the revert.

Thanks.

--
tejun