Re: [PATCH] dmaengine: idxd: fix double free in idxd_alloc() error path
From: Vinicius Costa Gomes
Date: Thu Apr 02 2026 - 13:37:42 EST
Guangshuo Li <lgs201920130244@xxxxxxxxx> writes:
> Hi Vinicius,
>
> Thanks for reviewing — the feedback is helpful.
>
> I'm working on top of v6.19-rc8-214-ge7aa57247700.
>
> Regarding the concern about put_device(conf_dev) triggering
> idxd_conf_device_release() and hitting a NULL idxd->wq in
> destroy_workqueue():
>
> idxd_conf_device_release() does not call destroy_workqueue(). That
> call lives in idxd_cleanup_internals(), which is a separate code path.
> The actual release callback is:
>
Current master includes that code:
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/drivers/dma/idxd/sysfs.c#n1839
That modification was part of fix series that I proposed and was applied
on time for v7.0. It seems that I didn't do a good enough job of going
through the error paths.
Cheers,
--
Vinicius