Re: [PATCH] workqueue: fix wq->cpu_pwq leak in alloc_and_link_pwqs() WQ_UNBOUND path

From: Tejun Heo

Date: Fri May 08 2026 - 14:04:54 EST


Hello,

On Fri, 08 May 2026 09:22:03 -0700, Breno Leitao wrote:
> For WQ_UNBOUND workqueues, alloc_and_link_pwqs() allocates wq->cpu_pwq
> via alloc_percpu() and then calls apply_workqueue_attrs_locked(). On
> failure it returns the error directly, bypassing the enomem: label
> which holds the only free_percpu(wq->cpu_pwq) in this function.
>
> [...]

Applied to wq/for-7.1-fixes (capitalized the first word of the
subject).

Thanks.

--
tejun