Re: [PATCH] workqueue: Use the kmem_cache_free() instead of kfree() to release pwq

From: Tejun Heo
Date: Mon Oct 09 2023 - 12:46:26 EST


On Sat, Oct 07, 2023 at 07:35:41PM +0800, Zqiang wrote:
> The pwq objects is allocated by kmem_cache_alloc(), this commit therefore
> use kmem_cache_free() instead of kfree() to release pwq objects and also
> make use the correct tracepoint("trace_kmem_cache_free") to trace the
> release of pwq.

This isn't wrong. kfree() can be used for memory allocated with
kmem_cache_alloc().

Thanks.

--
tejun