From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-ej1-f45.google.com (mail-ej1-f45.google.com [209.85.218.45]) (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 E177931D39A for ; Fri, 26 Jun 2026 20:49:59 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.218.45 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1782507001; cv=none; b=RWuFPRlexljd4Vfo7aXM/hQPQ7/TlmD9n5Bg4kDpVA4Ke7D29GtPEgzO+TNaeKsIRqdHfKnSbdV2eYReb/tlxp/783yyBUmOcCGvlF3QfUnyki9ZngVZwE4JfAS/5+I1TlrMMhotUnnv7lls+OM2JB/z+7gp7pj1NxrJQWaFwCA= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1782507001; c=relaxed/simple; bh=lqmOcWqI0FMeiKH4DVNZK8U1G2Kv6utppj1Q/a7Qx/Y=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=UJMlPIMEhVaXVVYpwM63HmFHnyQYGLEDCRbe1k+oxJM7WuXsAbeG4xGwi2mzE/O1Cjs1WVgjoHZT/rvaCMNsCaADEP97P/dOPN7RbDg+8KB081d2SN+tbumWycx+sGnmMP6pyMeOP+z9wCcSpRcJY78EdNYtUBYi/fVM5dj7XEw= 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=emGv4cKn; arc=none smtp.client-ip=209.85.218.45 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="emGv4cKn" Received: by mail-ej1-f45.google.com with SMTP id a640c23a62f3a-c1214350188so154475766b.0 for ; Fri, 26 Jun 2026 13:49:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1782506998; x=1783111798; 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; bh=pJ5pE+48i146L2Ym2Up31rAyIZfjYbmUnquanO7bZu4=; b=emGv4cKnofN7c9rO4jfnUS2rmyJq4OOfs32xeBq7aHaR6dVcpkF1I+6BoFllMpmLDZ rN4sWkgnu2WZWtHS2ohhDg/MvOIaZhcCVYMOaTYkC/IduwTKUubIbg3wlp43tEiC2SJe cosIoTC42Sin2Wd0b+epqISh3AyJBZGeSoFCStDQwEwUCTiRPnskiOU73s1El0niTCaF wIBHdsnUBEQEZUwMFi2w/RM55rrCACa5CSZbbD9G2UbC+7iQDRVi45UQC5/qkA1wtV+D fHk/iiQmFEerJtemQjhntMR0meHv7d/74KBcihw2GvMPnwOlK7knxy8/wOd0UoXu7Ncf 35Ng== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1782506998; x=1783111798; 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; bh=pJ5pE+48i146L2Ym2Up31rAyIZfjYbmUnquanO7bZu4=; b=TWvKsx+5jOw2Ho5DvVU0zHDQXdiUJF/6B3E6raeyFcEt7Rs5RPBedsJTqauO76NLch UJa/2xwsEXHfqKpA5MyOAZKcRbEhF6gZf2bQT3obf7c1ojqZUNR0HDwTKwl0RJ+JBKpp 7ZLE7AjY40yYgTTteBwQfzpF4eMigdmYr1uaLokx/Jw/7maIMDrw2bblkIJjU3Sljnya 5EJqRetd5+ejCMfkgb8v2uafb13T6nnCsMXjtKbpewiUTj5+3hxkfA8FF+05+E8sMpVb j1yhJdAlnarG32YQparxixf+lD/k2+XG91TZcoTd7pL8Skg5MoTA21lv9hp5HGFLKa/l blzA== X-Forwarded-Encrypted: i=1; AHgh+RqZElf73xlj1IMeCsV61NV00gAHvbASuJ6G9DLCTmDoXHrcEYTP4lWjVmWDYyUbmc+38RI7f+epVYWAIME=@vger.kernel.org X-Gm-Message-State: AOJu0YzBl9+0ZA6RdeuFo9ERi7Av6oaPLS2TxLGjpiDqtnz+zX+YH3Z0 GRzcOSzmFM4LkJvFEl3/9el4/QEB8c/Idjuk5TaUNED5HbUN/kzHOraS X-Gm-Gg: AfdE7cmroaAalU4pgEmAJjW8ComFWexiSWOPN8Z5jSseN9oTgEhB1z/lmPOy4/dKjGG wLuQXCr7Tk/0m13mfHZbPNMQbsTvz860R0aMGd7yOix7xg+ADqoK0eSy4fdyN6mLcbgBKM8n/rH O0ZvNuOBYG8dLTgCm4gW9JIy6Us5M8ZoFW467cxuvi1SqiROwi36LgDKB0TtXvByFyj6o1WZDQY ElEa5dSAcGiZtt3xAwwSI42dBRuJexA3Olva+5iD0lc2eMvlVctlZXlc6zuYSMjq4hzal24pRZ7 Ouv3Z3Re4SpFeMjcKIb4Sjh6dl+phz/39WOe+vK6PTsYrLCSc45Nl8kCuAMFrnvvr6OpDqnRykv BLXy9raVAwovCTQ3Q3WPPIs7D9UTV/9DqmpKUJhEOpwqI9CroIrhBEY8SR7odSNBCKACghD0A4U kI8eZQnknlWkvARuh4+zjgDT8MAHRkAfnWl84KUIchYrEL3noeYeKKlkKOOBtHtmE= X-Received: by 2002:a17:907:c0d:b0:c12:3597:2cd3 with SMTP id a640c23a62f3a-c1235973654mr75629366b.29.1782506998009; Fri, 26 Jun 2026 13:49:58 -0700 (PDT) Received: from node ([202.47.63.86]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-c11fbbe8118sm387907866b.24.2026.06.26.13.49.55 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 26 Jun 2026 13:49:57 -0700 (PDT) From: Muhammad Bilal To: Jorge Lopez , Hans de Goede , =?UTF-8?q?Ilpo=20J=C3=A4rvinen?= Cc: =?UTF-8?q?Thomas=20Wei=C3=9Fschuh?= , platform-driver-x86@vger.kernel.org, linux-kernel@vger.kernel.org, stable@vger.kernel.org, Muhammad Bilal Subject: [PATCH 2/2] platform/x86: hp-bioscfg: warn on element type mismatch instead of failing Date: Sat, 27 Jun 2026 01:49:45 +0500 Message-ID: <20260626204945.18868-3-meatuni001@gmail.com> X-Mailer: git-send-email 2.54.0 In-Reply-To: <20260626204945.18868-1-meatuni001@gmail.com> References: <20260626204945.18868-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" A type mismatch on one element does not necessarily corrupt the attribute being built, especially for non-critical type-specific elements such as possible values or bounds. Failing fatally here discards attributes that could otherwise be partially useful. Change the type mismatch handling from a fatal pr_err + return -EIO to a pr_warn + continue, freeing the accumulated string value and skipping the affected element. The attribute is still registered with whatever valid elements the BIOS did supply. 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 af4d1920d4880..78729354c04f2 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.54.0