From: Mario Limonciello <mario.limonciello@amd.com>
To: jorge.lopez2@hp.com, hansg@kernel.org,
ilpo.jarvinen@linux.intel.com, linux@weissschuh.net
Cc: stable@vger.kernel.org, Paul Kerry <p.kerry@sheffield.ac.uk>,
platform-driver-x86@vger.kernel.org
Subject: Re: [PATCH] platform/x86: hp-bioscfg: Support allocations of larger data
Date: Tue, 24 Feb 2026 09:06:57 -0600 [thread overview]
Message-ID: <b419d9c6-e153-47a7-bdec-ff7d3dd7b90e@amd.com> (raw)
In-Reply-To: <20260223163245.3294630-1-mario.limonciello@amd.com>
On 2/23/2026 10:32 AM, Mario Limonciello wrote:
> Some systems have much larger amounts of enumeration attributes
> than have been previously encountered. This can lead to page allocation
> failures when using kcalloc(). Switch over to using kvcalloc() to
> allow larger allocations.
>
> Fixes: 6b2770bfd6f92 ("platform/x86: hp-bioscfg: enum-attributes")
> Cc: stable@vger.kernel.org
> Reported-by: Paul Kerry <p.kerry@sheffield.ac.uk>
> Closes: https://bugs.debian.org/1127612
> Signed-off-by: Mario Limonciello <mario.limonciello@amd.com>
Add a tag for Paul's test
(https://lore.kernel.org/platform-driver-x86/b2535142-aaff-4eb0-87bd-34c9f8f16f07@sheffield.ac.uk/T/#m5ae303266e0685309c19c67d2e320a6d42579cd5)
Tested-by: Paul Kerry <p.kerry@sheffield.ac.uk>
> ---
> drivers/platform/x86/hp/hp-bioscfg/enum-attributes.c | 7 +++++--
> 1 file changed, 5 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/platform/x86/hp/hp-bioscfg/enum-attributes.c b/drivers/platform/x86/hp/hp-bioscfg/enum-attributes.c
> index 470b9f44ed7aa..af24313d078db 100644
> --- a/drivers/platform/x86/hp/hp-bioscfg/enum-attributes.c
> +++ b/drivers/platform/x86/hp/hp-bioscfg/enum-attributes.c
> @@ -94,8 +94,11 @@ int hp_alloc_enumeration_data(void)
> bioscfg_drv.enumeration_instances_count =
> hp_get_instance_count(HP_WMI_BIOS_ENUMERATION_GUID);
>
> - bioscfg_drv.enumeration_data = kzalloc_objs(*bioscfg_drv.enumeration_data,
> - bioscfg_drv.enumeration_instances_count);
> + if (!bioscfg_drv.enumeration_instances_count)
> + return -EINVAL;
> + bioscfg_drv.enumeration_data = kvcalloc(bioscfg_drv.enumeration_instances_count,
> + sizeof(*bioscfg_drv.enumeration_data), GFP_KERNEL);
> +
> if (!bioscfg_drv.enumeration_data) {
> bioscfg_drv.enumeration_instances_count = 0;
> return -ENOMEM;
next prev parent reply other threads:[~2026-02-24 15:07 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-02-23 16:32 [PATCH] platform/x86: hp-bioscfg: Support allocations of larger data Mario Limonciello
2026-02-24 15:06 ` Mario Limonciello [this message]
2026-02-25 20:44 ` Ben Hutchings
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=b419d9c6-e153-47a7-bdec-ff7d3dd7b90e@amd.com \
--to=mario.limonciello@amd.com \
--cc=hansg@kernel.org \
--cc=ilpo.jarvinen@linux.intel.com \
--cc=jorge.lopez2@hp.com \
--cc=linux@weissschuh.net \
--cc=p.kerry@sheffield.ac.uk \
--cc=platform-driver-x86@vger.kernel.org \
--cc=stable@vger.kernel.org \
/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