Re: [PATCH] fpga: region: fix use-after-free in child_regions_with_firmware()
Xu Yilun <[email protected]> Mon, 4 May 2026 19:22:20 +0800
| Newsgroups | org.kernel.vger.linux-fpga,org.kernel.vger.linux-kernel,org.kernel.vger.stable |
|---|---|
| Message-ID | <afiBbC46CFauotNt@yilunxu-OptiPlex-7050> |
On Wed, Apr 08, 2026 at 03:45:34PM +0000, Wentao Liang wrote:
> Move of_node_put(child_region) after the error print to avoid accessing
> freed memory when pr_err() references child_region.
>
> Fixes: ef3acdd82075 ("fpga: region: move device tree support to of-fpga-region.c")
The Fixes tag should identify the commit that introduced the problem, so
it should be:
Fixes: 0fa20cdfcc1f ("fpga: fpga-region: device tree control for FPGA")
I fixed it in place.
Reviewed-by: Xu Yilun <[email protected]>
Applied to for-next