Re: [PATCH] dmaengine: idxd: Fix double free in idxd_setup_wqs()

From: Vinod Koul
Date: Wed Aug 20 2025 - 13:39:33 EST



On Mon, 11 Aug 2025 13:43:39 +0300, Dan Carpenter wrote:
> The clean up in idxd_setup_wqs() has had a couple bugs because the error
> handling is a bit subtle. It's simpler to just re-write it in a cleaner
> way. The issues here are:
>
> 1) If "idxd->max_wqs" is <= 0 then we call put_device(conf_dev) when
> "conf_dev" hasn't been initialized.
> 2) If kzalloc_node() fails then again "conf_dev" is invalid. It's
> either uninitialized or it points to the "conf_dev" from the
> previous iteration so it leads to a double free.
>
> [...]

Applied, thanks!

[1/1] dmaengine: idxd: Fix double free in idxd_setup_wqs()
commit: 39aaa337449e71a41d4813be0226a722827ba606

Best regards,
--
~Vinod