mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Yazen Ghannam <yazen.ghannam@amd.com>
To: yolezz <yolezz.secret@gmail.com>
Cc: mario.limonciello@amd.com, x86@kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v4] x86/amd/node: Release reserved config regions on init error
Date: Tue, 15 Sep 2026 18:20:10 -0400	[thread overview]
Message-ID: <20260915222010.GA3101@yaz-khff2.amd.com> (raw)
In-Reply-To: <20260915180543.112708-1-yolezz.secret@gmail.com>

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@gmail.com>
> ---
> v4:
>  - Remove unnecessary braces around the kzalloc_objs() error check (as suggested by Yazen Ghannam).
> 

I didn't suggest this.

Thanks,
Yazen

      parent reply	other threads:[~2026-09-15 22:20 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-09-15 16:22 [PATCH] " yolezz
2026-09-15 16:35 ` Mario Limonciello
2026-09-15 17:23   ` [PATCH v2] " yolezz
2026-09-15 17:32     ` Mario Limonciello
2026-09-15 17:36   ` [PATCH v3] " yolezz
2026-09-15 17:42     ` Mario Limonciello
2026-09-15 18:05   ` [PATCH v4] " yolezz
2026-09-15 19:07     ` Mario Limonciello
2026-09-15 20:54     ` Borislav Petkov
2026-09-15 22:20     ` Yazen Ghannam [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20260915222010.GA3101@yaz-khff2.amd.com \
    --to=yazen.ghannam@amd.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mario.limonciello@amd.com \
    --cc=x86@kernel.org \
    --cc=yolezz.secret@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®