Re: [PATCH v4] x86/amd/node: Release reserved config regions on init error
From: Yazen Ghannam
Date: Tue Sep 15 2026 - 18:20:26 EST
On Tue, Sep 15, 2026 at 08:05:43PM +0200, yolezz wrote:
> In amd_smn_init(), if pci_request_config_region_exclusive() fails or
> if kzalloc_objs() fails to allocate memory for amd_roots, the already
> reserved PCI config regions are left allocated.
>
> Use a __free() cleanup helper to automatically release all reserved PCI
> config space regions on error exit paths.
>
What's wrong with leaving these reserved?
> Fixes: 83518453074d ("x86/amd_node: Add SMN offsets to exclusive region access")
> Signed-off-by: yolezz <yolezz.secret@xxxxxxxxx>
> ---
> v4:
> - Remove unnecessary braces around the kzalloc_objs() error check (as suggested by Yazen Ghannam).
>
I didn't suggest this.
Thanks,
Yazen