From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 6D2C038F249 for ; Mon, 9 Mar 2026 10:18:11 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1773051491; cv=none; b=mr/4R4xqewaK3StrVykVyBZKHH+5LcaknMjhkZ+xjwD0gQcSOp+S3QG9rh648huTNEkpMvX0/L9ClI+cWfhJjCMlCgG1FHNLDcoMuFktAw12xJMXeJ4+Or29rUnQrfCjKQDe3s3FIYXHLXBd/aV6QuDQRQUyJl15RgChgeNIes8= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1773051491; c=relaxed/simple; bh=MF9o56oI0PRNrp6miKuVLWEXCAIqP74bQ9AvQgT1tXA=; h=Subject:To:Cc:From:Date:Message-ID:MIME-Version:Content-Type; b=qJXfJw7lk9OFPxaP3sKDzM+VJoQch0A65Xf1EuR0ZVW6RH46NDKWX2VEUuvKBzDsiEEuzk3k0MBloMEM/cBQepYdwfxa0C0MAhZS3ll6blz6OK99+3NlGmBPFPYOnmAvYRiAO/HSqwtLo3HclrrbRPrMGMdjIcg7RY2PJMn7Zy8= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=FMFTZJFK; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="FMFTZJFK" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 021E9C4CEF7; Mon, 9 Mar 2026 10:18:10 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1773051491; bh=MF9o56oI0PRNrp6miKuVLWEXCAIqP74bQ9AvQgT1tXA=; h=Subject:To:Cc:From:Date:From; b=FMFTZJFKZzi4btRjHgw8w88YicRxuTEyfj5lxSRBU2w20WSFJd0tEDOLw8mDavCIf Y0UGEQ9soqv+MSKsenetfegJJLFIAyfJ1zd62rAOKxPMNzUL1b4ySnUBXLopGJmKRe rmSWMvFoS1QYG/E0m9wsFKPGVDGHnqjz1qlGQ2uw= Subject: FAILED: patch "[PATCH] platform/x86: hp-bioscfg: Support allocations of larger data" failed to apply to 6.18-stable tree To: mario.limonciello@amd.com,ilpo.jarvinen@linux.intel.com,p.kerry@sheffield.ac.uk Cc: From: Date: Mon, 09 Mar 2026 11:17:29 +0100 Message-ID: <2026030929-aground-facility-67d7@gregkh> Precedence: bulk X-Mailing-List: stable@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The patch below does not apply to the 6.18-stable tree. If someone wants it applied there, or to any other stable or longterm tree, then please email the backport, including the original git commit id to . To reproduce the conflict and resubmit, you may use the following commands: git fetch https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/ linux-6.18.y git checkout FETCH_HEAD git cherry-pick -x 916727cfdb72cd01fef3fa6746e648f8cb70e713 # git commit -s git send-email --to '' --in-reply-to '2026030929-aground-facility-67d7@gregkh' --subject-prefix 'PATCH 6.18.y' HEAD^.. Possible dependencies: thanks, greg k-h ------------------ original commit in Linus's tree ------------------ >From 916727cfdb72cd01fef3fa6746e648f8cb70e713 Mon Sep 17 00:00:00 2001 From: Mario Limonciello Date: Wed, 25 Feb 2026 15:06:46 -0600 Subject: [PATCH] platform/x86: hp-bioscfg: Support allocations of larger data MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 Tested-by: Paul Kerry Closes: https://bugs.debian.org/1127612 Signed-off-by: Mario Limonciello Link: https://patch.msgid.link/20260225210646.59381-1-mario.limonciello@amd.com Reviewed-by: Ilpo Järvinen Signed-off-by: Ilpo Järvinen diff --git a/drivers/platform/x86/hp/hp-bioscfg/enum-attributes.c b/drivers/platform/x86/hp/hp-bioscfg/enum-attributes.c index 470b9f44ed7a..af4d1920d488 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; @@ -444,6 +447,6 @@ void hp_exit_enumeration_attributes(void) } bioscfg_drv.enumeration_instances_count = 0; - kfree(bioscfg_drv.enumeration_data); + kvfree(bioscfg_drv.enumeration_data); bioscfg_drv.enumeration_data = NULL; }