From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-ed1-f51.google.com (mail-ed1-f51.google.com [209.85.208.51]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id D69DA360EC2 for ; Tue, 7 Jul 2026 20:22:02 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.208.51 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1783455724; cv=none; b=dqXfnX31hZ66bQvUbLNIJ69Ca1WAEWOD7ctcQhMDBTGUDA/1Z7g9rTpRznZj02ZZLfxXLSWI2D7F/L0JUQQ1TH/pD84tYx6R6FHoSZ+LhTDokJQtk6oeD4uuUlkLUao+BI6nh3mxhc+YZ4LxzR/3b81Ifs2inintqiuEhDILc5w= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1783455724; c=relaxed/simple; bh=+fb2hm/AV+gpBOcwwKZ0VASVGKm3XP6ZLpjp9sYFqfw=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=Cy1/9UhbTXU/zAn70Pol8ZzL5jEEtQmxfONQcrsAbr+AzoU1zhidFF4Sd0XtX7lRB10Eov5HDrs1q/m/eFYlH/xCAT4ywjO0SscEgXOHj5KfO4DSgAyDT5hUWW9uBY/RocFRL36dnA6VAUFweV/8JuPCWaGOkGuP9Xp5eBmYFsM= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=rpioySt8; arc=none smtp.client-ip=209.85.208.51 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="rpioySt8" Received: by mail-ed1-f51.google.com with SMTP id 4fb4d7f45d1cf-698bf053053so6909342a12.3 for ; Tue, 07 Jul 2026 13:22:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1783455721; x=1784060521; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to:content-type; bh=aWjcO3quzBLPCQpyEkYQryJlDPpxypgV7KUttYaLljc=; b=rpioySt8g43amb3wPDAvzV2tjYh9b4Qgl4fCThMAkiYRotEaainWy/SOOSGD04GDPg T8IGYvvRYxdsAwqC40w/Pt+bNDcNjEe+JxWaMLm6OF26DuJgyj7IVeSKATgM7mp4cT9E wJxkv8V2howT9LDwC6kKkV2pT6PJuakqVgLyuPcKZ8ijvx3anmHzakbjgpJRNbKJTMgG yh3BOrfbTjzG0L3Or/DVbPXjY7OX3wKTAxWJeeNH1OxFSytdWVmJFYQsUwgFp1xZ4YQa 4NrLifDud5PUBiBrmucFvAXHislL24VcDJuPJ7IpFdhbAEbMUAP+Yb7dXeRx7aolsQcq Ttxg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1783455721; x=1784060521; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to:content-type; bh=aWjcO3quzBLPCQpyEkYQryJlDPpxypgV7KUttYaLljc=; b=OE3SYOfA1R7+gh/v7Vrf/65PaGXaDOqrRI8UuADyTPOYgR86ndUbT9Wn7tlNVP0lrB x4lGT/vnCeb3nkKQMJJsh7yagE16YHUQGDQhSVgggXZc+iBn/caeEbB58U3KJi1M7FhM KxID9isKsxxtV8aMCh1bh/K4fMu5cb27+5CXLP/UdYG7GeRbZ32fPbZkbwlT89WptY9A UALFTsd5vA2DLP5fbGUlTsb6rT+ofcSf25hw7HMDjulqw7c1vDfl1XTvVZUrEWhLos53 tc4zBsD2Gaim7GwzcgcWt5IhLp3OYe7v7J07q3JaNKW5Y+CcUH4br4wZum/fZKyHd1Sg +qWA== X-Gm-Message-State: AOJu0YzzAJRj49t8eRppD2L88VzFW9jQofzT77zvpDQ4RmKDXuwU+iqd OoQ8dbTcWS3N+OhJzSnTokU/j5L5zBWOAx86/vb3AYG6Day/gqh5clcK X-Gm-Gg: AfdE7cnb/qV/H8UeozATGwHsyAqCgKRLdxVYqcFT/wRFjPb5ca6XZhpM9IbnIRzxqkG rsu/mHLTVhrQTQ9p3imaJpGpzuL+odp1gBBiKHSPhnNfsVYz/ddloFGnhpfDAZHO5MHWYeAHpo8 IM4xnpBak6JKk2L2Jn6kijKhZytZYsMVEKiH7W0xxKvGBklW/O1kSqZ++Y4LySLH13w4msZXm6L ix6HEz2xWIfP/0w0CDCxhpBCoXiD4acSih3Ito1BLJo0xOsWIt/c/+rNp6CCEog5vAAwDibE9wG owOWMKQ7+dhdC31w6L/fpxMl10W0jw5YTWNOwglP7JCqxwFm4lTl5SAqaz/GfUVs4x2rakCux0T d520KdIOPJ5M8ISxp9RJjsueUNryG7iWL6N3Ueb5SkLIYiBte2Iog8PzXIu3aDmblhw4oKEWv9y 2xZhokfXRdacIs55H2IFPREm8I2vtnvTsdMEPW1cD38+fcUYaPPEGlWuZyYzCoUv0= X-Received: by 2002:a05:6402:5107:b0:698:b23a:e54a with SMTP id 4fb4d7f45d1cf-69a85c281cdmr3729267a12.31.1783455720810; Tue, 07 Jul 2026 13:22:00 -0700 (PDT) Received: from node ([202.47.63.86]) by smtp.gmail.com with ESMTPSA id 4fb4d7f45d1cf-69aa6dba523sm637930a12.0.2026.07.07.13.21.57 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 07 Jul 2026 13:22:00 -0700 (PDT) From: Muhammad Bilal To: platform-driver-x86@vger.kernel.org Cc: linux-kernel@vger.kernel.org, ilpo.jarvinen@linux.intel.com, hdegoede@redhat.com, jorge.lopez2@hp.com, Thomas.Weissschuh@linutronix.de, superm1@kernel.org, W_Armin@gmx.de, stable@vger.kernel.org, Muhammad Bilal Subject: [PATCH v3 4/4] platform/x86: hp-bioscfg: warn on element type mismatch instead of failing Date: Wed, 8 Jul 2026 01:21:11 +0500 Message-ID: <20260707202111.35414-5-meatuni001@gmail.com> X-Mailer: git-send-email 2.55.0 In-Reply-To: <20260707202111.35414-1-meatuni001@gmail.com> References: <20260707202111.35414-1-meatuni001@gmail.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit hp_populate_enumeration_elements_from_package() returns -EIO and aborts enumeration of the entire attribute when any single element has an unexpected ACPI type. This is observed on HP EliteBook 840 G2 when the BIOS returns malformed ACPI data following a failed WMI query: ACPI BIOS Error (bug): AE_AML_BUFFER_LIMIT, Index (0x000000032) is beyond end of object (length 0x32) ACPI Error: Aborting method \_SB.WMID.WQBE due to previous error Error expected type 2 for elem 13, but got type 1 instead hp_bioscfg: Returned error 0x3, "Invalid command value/Feature not supported" Aborting immediately discards the attribute entirely. Warn about the unexpected element type, free the temporary string, skip the offending element, and continue parsing the remaining package instead of failing the whole attribute. Fixes: a34fc329b189 ("platform/x86: hp-bioscfg: bioscfg") Cc: stable@vger.kernel.org Signed-off-by: Muhammad Bilal --- drivers/platform/x86/hp/hp-bioscfg/enum-attributes.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/drivers/platform/x86/hp/hp-bioscfg/enum-attributes.c b/drivers/platform/x86/hp/hp-bioscfg/enum-attributes.c index 3aa2c440e0528..b834303e5bc79 100644 --- a/drivers/platform/x86/hp/hp-bioscfg/enum-attributes.c +++ b/drivers/platform/x86/hp/hp-bioscfg/enum-attributes.c @@ -163,10 +163,11 @@ static int hp_populate_enumeration_elements_from_package(union acpi_object *enum /* Check that both expected and read object type match */ if (expected_enum_types[eloc] != enum_obj[elem].type) { - pr_err("Error expected type %d for elem %d, but got type %d instead\n", - expected_enum_types[eloc], elem, enum_obj[elem].type); + pr_warn("Unexpected element type at elem %d: expected %d, got %d, skipping\n", + elem, expected_enum_types[eloc], enum_obj[elem].type); kfree(str_value); - return -EIO; + str_value = NULL; + continue; } /* Assign appropriate element value to corresponding field */ -- 2.55.0