From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=100.103.45.18 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1794585932; b=TBtlaaL03jUmj/ovU0TCGodt3M63Qo8LjsW+8T2BWo3B7DDUBj93mpBMgGfWrY9Uawym 6ihrnsclbq6cnWaoQU2BibljgEIOEQLzOOY1rljG3pmdmS+IYnFzzumt7EGUJX4RAA2NG INz0lkwb6XJX25uMBbPozQ0ZY7ivDwwadmZZhUmAc1buXYaLfb+zHSg/lfzlvYw83I73a qkgvifgWv9Xj7OU/snblbcJJsfK2geKk1ZjuJMIzJ9bgkDQsZHUYrl77PSEZKxHLYYq+H yziN+DZagGCtwuLiU8oVeMEBto+jAoG23fN2rHiUab86wcn/Giqb3xXVoh68GfvOaTw== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1794585932; h=Received:DKIM-Signature:From:To:Cc:Subject:Date:Message-ID:X-Mailer: In-Reply-To:References:User-Agent:X-stable:X-Patchwork-Hint: MIME-Version:Content-Type:Content-Transfer-Encoding; bh=B7dq/0S/wDaQ6bXxlJPERilZZLOyaQKASs9J/d01Lck=; b=0DEU9EKgASTp9KnmJKTh/TkDDiIV2+iCVBNBXoLreIeDRZKnGnP7PsnAkCx/oFvTCvNx gFCA7jGDY5h4+gf4jwJAyYI/Brb92bnleTeWMVp5V2hFibuOKFROCHmSO2fGl57ztXtID FsgCcbQiSSOZEFtWXLIn2b+B+1u68TacTRS2WytcgIVUfQs66NySbDQmdnO13zX4WhPQv YPWYcGgdJTDZ6YpZ/pUUh5r5BwhMjy8FxV7BvJFjsuU8L5jIjVy29CmvtFxDtM3+XgdcI b3wuQPGSc5ZBXgWwtXQwbJ3wjnfEfzFYIm0u6xWNlXiCXu0RtuHfYJpWl3CiKLpHXKg== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass header.d=linuxfoundation.org header.i=@linuxfoundation.org header.a=rsa-sha256 header.s=korg header.b=WQROQEIt; arc=none smtp.remote-ip=100.103.45.18 Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id B93D5606A889; Fri, 13 Nov 2026 16:05:32 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.a=rsa-sha256 header.s=korg header.b=WQROQEIt Received: by smtp.kernel.org (Postfix) with ESMTPSA id 6D5321F000C4; Fri, 13 Nov 2026 16:05:32 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=korg; t=1794585932; bh=B7dq/0S/wDaQ6bXxlJPERilZZLOyaQKASs9J/d01Lck=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=WQROQEItT2ZHRnpiYLcf0kla7XeePI2ZAU1S62DObiTy/eZFdT9v0KQgjPlf7wJ1D VPRexKFfUxg9pknMnGW9hszf5jE+oSPfuKJsxVZ74ObSfbR5o26kBMFJv5Hwd5x/cD m7dPjJa8k+2oRQye6fkyZX9nLAGz6Cdq3enDf9Dw= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Charis Stratakis , =?UTF-8?q?Ali=20Ahmet=20Memi=C5=9F?= , Hans de Goede , Rong Zhang , "Rafael J. Wysocki" , Sasha Levin Subject: [PATCH 7.3 490/507] ACPI: battery: Evaluate battery methods exclusively Date: Fri, 13 Nov 2026 10:53:14 -0500 Message-ID: <20261113153813.678326017@linuxfoundation.org> X-Mailer: git-send-email 2.56.0 In-Reply-To: <20261113153753.358973689@linuxfoundation.org> References: <20261113153753.358973689@linuxfoundation.org> User-Agent: quilt/0.69 X-stable: review X-Patchwork-Hint: ignore X-Mailing-List: patches@lists.linux.dev List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 7.3-stable review patch. If anyone has any objections, please let me know. ------------------ From: Ali Ahmet Memiş [ Upstream commit 645f370c932db2cd3893f7fee61aa8b9debc8ac0 ] On ThinkPad P1 Gen2 and P53, INT3403 _TMP switches the EC page selector without taking the AML mutex the battery methods use, so _BIX and _BST running at the same time can read the wrong page. Since commit d33e89d12295 ("thermal: core: Suspend thermal zones later and resume them earlier") this happens on most resumes. Evaluate the battery methods with acpi_evaluate_object_exclusive(). Fixes: d33e89d12295 ("thermal: core: Suspend thermal zones later and resume them earlier") Reported-by: Charis Stratakis Closes: https://lore.kernel.org/all/37N_jFulf7n-Z55NfKfE71C_wVPxYvZ0xD_iRUg2fXu7TypDiF5PStQ6siSfVBih6fThg5WoPes8U5ZQpfVm_teMFcUGXFxz2DdMbfSWuws=@proton.me/ Cc: All applicable # 80892972ff23 ACPI: utils: Add exclusive AML evaluation helpers Signed-off-by: Ali Ahmet Memiş Reviewed-by: Hans de Goede Reviewed-by: Rong Zhang Link: https://patch.msgid.link/20261018122220.678822-3-aliamemis@disroot.org Signed-off-by: Rafael J. Wysocki Signed-off-by: Sasha Levin --- drivers/acpi/battery.c | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/drivers/acpi/battery.c b/drivers/acpi/battery.c index 670853ec3a4d7..7169ac7e83f31 100644 --- a/drivers/acpi/battery.c +++ b/drivers/acpi/battery.c @@ -583,9 +583,8 @@ static int acpi_battery_get_info(struct acpi_battery *battery) struct acpi_buffer buffer = { ACPI_ALLOCATE_BUFFER, NULL }; acpi_status status = AE_ERROR; - status = acpi_evaluate_object(battery->device->handle, - use_bix ? "_BIX":"_BIF", - NULL, &buffer); + status = acpi_evaluate_object_exclusive(battery->device->handle, + use_bix ? "_BIX" : "_BIF", NULL, &buffer); if (ACPI_FAILURE(status)) { acpi_handle_info(battery->device->handle, @@ -624,8 +623,7 @@ static int acpi_battery_get_state(struct acpi_battery *battery) msecs_to_jiffies(cache_time))) return 0; - status = acpi_evaluate_object(battery->device->handle, "_BST", - NULL, &buffer); + status = acpi_evaluate_object_exclusive(battery->device->handle, "_BST", NULL, &buffer); if (ACPI_FAILURE(status)) { acpi_handle_info(battery->device->handle, "_BST evaluation failed: %s", @@ -675,8 +673,8 @@ static int acpi_battery_set_alarm(struct acpi_battery *battery) !test_bit(ACPI_BATTERY_ALARM_PRESENT, &battery->flags)) return -ENODEV; - status = acpi_execute_simple_method(battery->device->handle, "_BTP", - battery->alarm); + status = acpi_execute_simple_method_exclusive(battery->device->handle, "_BTP", + battery->alarm); if (ACPI_FAILURE(status)) return -ENODEV; -- 2.53.0