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 138D881732 for ; Mon, 9 Mar 2026 10:18:21 +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=1773051502; cv=none; b=cRxaKo+Whcd/LrGQKKiqQklxs33hf1ho2Fg6L7J0oO6geQvvmfJOCgITtXOyK8vdckuyP8+Hujdpgic/263kiQ41pMw5S9X0DoUpM3ALTrJNshZoLmOfwppEsPcFnC19uFfdjEzFR09jYlmJSw8j96EKdbrGdnyYHI8K15Fifo8= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1773051502; c=relaxed/simple; bh=jGEF//W012gfIEVWqY1QL1kubjHOmZBo/1L3QcwlG9I=; h=Subject:To:Cc:From:Date:Message-ID:MIME-Version:Content-Type; b=VtVJRgW6W+VrgYFAIkvbTP4UnNoR0/og1uDTDup1yFEDAPCoz6Lku4vHf2Ho5vDzG3vuf+Uc76dyZTcNXgaiBSOWksT3+7Ci47ke6Aa40eGHFqNggQwEooJFQMpAwm+80XvdqLEB448xqqCm9Vvms6cDVWLfBDDpJSZv8mjXn4o= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=J7d86jIh; 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="J7d86jIh" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 69DA2C4CEF7; Mon, 9 Mar 2026 10:18:21 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1773051501; bh=jGEF//W012gfIEVWqY1QL1kubjHOmZBo/1L3QcwlG9I=; h=Subject:To:Cc:From:Date:From; b=J7d86jIhILpdtRVNrRyVceZqfwAEM+1k6N8/TymgaM+ipz2OXJdHV6Hj7Iwr4qz2z VcUfMAQs9GgBC8cbWjHyFBbKIH7MDdeM+v+Y+SuRfRB2VE276Vlb05EWWsCDAzwig8 D5lXI7kQ0bvuAbXyzf/l7xm9vP3aAQp8Owj+xGF4= Subject: FAILED: patch "[PATCH] platform/x86: hp-bioscfg: Support allocations of larger data" failed to apply to 6.12-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:30 +0100 Message-ID: <2026030929-deepen-powwow-6468@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.12-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.12.y git checkout FETCH_HEAD git cherry-pick -x 916727cfdb72cd01fef3fa6746e648f8cb70e713 # git commit -s git send-email --to '' --in-reply-to '2026030929-deepen-powwow-6468@gregkh' --subject-prefix 'PATCH 6.12.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; }