Re: [PATCH 5/5] staging: media: ipu7: fix double-free of pdata in error paths
From: Alexandru Hossu
Date: Mon Apr 13 2026 - 06:03:56 EST
On Mon, Apr 13, 2026, Dan Carpenter wrote:
> We need a Fixes tag.
>
> The put_device() frees isys_adev as well so this is a use after free.
>
> ret = dev_err_probe(dev, PTR_ERR(isys_adev->mmu), ...
> put_device();
> return ret;
Good catch on the use-after-free in the return value. Will send v2 with:
- Fixes: b7fe4c0019b1 ("media: staging/ipu7: add Intel IPU7 PCI device driver")
- Save error code via ret = dev_err_probe() before put_device() in both
ipu7_isys_init() and ipu7_psys_init(), then return ERR_PTR(ret)
Alexandru