Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp2788222imm; Sun, 29 Jul 2018 03:27:17 -0700 (PDT) X-Google-Smtp-Source: AAOMgpfWUQ7BH8gV+T6v5ntDFtjkctF33LJpz1VD5ef1XobreWc4EqS22M3yVypGQQDvvlFef3TL X-Received: by 2002:a63:5d09:: with SMTP id r9-v6mr12318098pgb.303.1532860037446; Sun, 29 Jul 2018 03:27:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1532860037; cv=none; d=google.com; s=arc-20160816; b=aDMlO99utoFycC2ZmoITC7JE5Z00TmV27xs+lR1wL5lwAKkjsb06p+7K3QKt1STzy0 SiOQ6t7XeKXelOfYEII81dPXLgEFab4QTq84wk1B+HT9zd054v8gELZbSO2ZfKqqoe9l c4ewvv9NFtkvi8+ew3faXZ9oCXgvkDTkjNUHOEtMFTqsOVGWsC56+tDcoNVy/Cd2mq1j qxgaUle6ebdrz5nza5SmrlCa5PIZv2RsntQapPAORo6Wghmzlm4lS81i7vMSyqZ9EkXG E+FywbawgjCjcT7EW7ba9TMxizqbo3oITgAoxRYnq9iuvX64dc0+JdlcdJFflImUBQ8f SgtQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :references:in-reply-to:mime-version:dkim-signature :arc-authentication-results; bh=qvukRtzl8KcvmaFDZEMrYpXoxevaggdLNkphfGjs0P0=; b=dk7nlEoQofUa7Fggn1kCdWYMwrBojunwhMU+uN956fmVypdD6guK3zSLi3lpA8sTSc tPIAnnZdaRrLE7in8q0/KoAblL23Tb56D4QZ/GrYWLS6qwpP1IJA5T0tVo4hu3gTJw5k 9CXR+Z1hnlXUwpKaZ8dbUL7hcvzx+IrlrAeOg3b5974FIw15ULG+xidMk95WmZjZ/hr+ Tetne6aYajRS2T4WITJ2NFBYW2qEXTbbLoU6Xl004PjnbEEbCs7TX1ARaR0jq8DMAIzg Ctw+qwhG0lIaRoeDLlG6U3UpZxYkL0DAmsZdAn0OmGk9ZocdGpxEO5RUdV0/TVT1eoNL MR2w== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@gmail.com header.s=20161025 header.b=jQ1bkV+s; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id x5-v6si8273109pgc.210.2018.07.29.03.26.47; Sun, 29 Jul 2018 03:27:17 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=fail header.i=@gmail.com header.s=20161025 header.b=jQ1bkV+s; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726405AbeG2LzY (ORCPT + 99 others); Sun, 29 Jul 2018 07:55:24 -0400 Received: from mail-oi0-f65.google.com ([209.85.218.65]:34796 "EHLO mail-oi0-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726361AbeG2LzY (ORCPT ); Sun, 29 Jul 2018 07:55:24 -0400 Received: by mail-oi0-f65.google.com with SMTP id 13-v6so16383615ois.1; Sun, 29 Jul 2018 03:25:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc; bh=qvukRtzl8KcvmaFDZEMrYpXoxevaggdLNkphfGjs0P0=; b=jQ1bkV+sczvvK8K6askkPUirrpNNTXszPKeLzJFnoL5DBv6JvByNVz01W/GIxVhaag KIS6+KeZ4TSvkWq54a1v4T/kk51uSB4tp339LZE6F2lUdLaw6j7q2rApRxMS0wNRlBUF oJyYl60V1Z6QfeyCl9rxI5qOzdDfbXK/eohIuAQ7idLVfjSD9BCKr8L4+fCmJHt18Jjm Ct/Q+K+VS25WmvDi5rZbhLQyqA5YuZzRcczMJTJWc8/GFbYUMwYm2aOED9t7QWZl8U31 yVbWOSgd4DstV56/zn+oxV5aG19IwqNqSWkCMoaQ31/5af5d7/DM8SwBiWjpKqtTDIEK XKbA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:sender:in-reply-to:references:from :date:message-id:subject:to:cc; bh=qvukRtzl8KcvmaFDZEMrYpXoxevaggdLNkphfGjs0P0=; b=HwWQdh4SKuXei6J5OEA9v+8/12FK1S6AGiVkKK4JEQhjiO6d+Zvbm3zdpsWXyuG36l b+0/gnGuwg4DHemO0O90nbuSmfMcZcu0B3Ed1mStr8tECwT8JRRTtNe7tTGeZhvRHAxH VSUODAU10dT8piOv4FAI8ZXPZFer5U9LjJWhdtI4RrZepX7G97X6Fio3+CaXaTWJNKXj aJRr17hVieRmd05PqJDO56JNIV+r4G0vN8O9oySyLHSFKRf9F7VRF+rR/efx9HOgbHB6 gA1u20uqTAvFYrlkNbBOdQBCS3hfblQ1tDpPoROyue9lM7ON9SvWQBVr3w5orw0VZY8C bmaQ== X-Gm-Message-State: AOUpUlGZBEyqmFTYfpDNWW8h1Hkl21DWHI1t+iTWycVSoPWPFG/PoG9O mTJSlbGyaGWiGjrkJYobSzP1xjkVyd+oOwTmh30NZQ== X-Received: by 2002:aca:6285:: with SMTP id w127-v6mr12942764oib.120.1532859926472; Sun, 29 Jul 2018 03:25:26 -0700 (PDT) MIME-Version: 1.0 Received: by 2002:a9d:63d2:0:0:0:0:0 with HTTP; Sun, 29 Jul 2018 03:25:26 -0700 (PDT) In-Reply-To: <20180728210519.20195-1-erik.schmauss@intel.com> References: <20180728210519.20195-1-erik.schmauss@intel.com> From: "Rafael J. Wysocki" Date: Sun, 29 Jul 2018 12:25:26 +0200 X-Google-Sender-Auth: n8lSReOaRA23A9kyGZdJ1qb6lY8 Message-ID: Subject: Re: [PATCH] ACPICA: AML Parser: ignore control method status in module-level code To: Erik Schmauss Cc: ACPI Devel Maling List , "Rafael J. Wysocki" , Greg Kroah-Hartman , Linux Kernel Mailing List , oleksandr@natalenko.name, Linus Torvalds Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sat, Jul 28, 2018 at 11:05 PM, Erik Schmauss wrote: > Previous change in the AML parser code blindly set all non-successful > dispatcher statuses to AE_OK. This approach is incorrect because > successful control method invocations from module-level return > AE_CTRL_TRANSFER. Overwriting AE_OK to this status causes the AML > parser to think that there was no return value from the control > method invocation. > > fixes: 73c2a01c52b6 (ACPICA: AML Parser: ignore dispatcher error status during table load) > > Reported-by: Linus Torvalds > Tested-by: Linus Torvalds > Tested-by: Oleksandr Natalenko > Signed-off-by: Erik Schmauss > --- > drivers/acpi/acpica/psloop.c | 19 ++++++++++++------- > 1 file changed, 12 insertions(+), 7 deletions(-) > > diff --git a/drivers/acpi/acpica/psloop.c b/drivers/acpi/acpica/psloop.c > index ee840be150b5..44f35ab3347d 100644 > --- a/drivers/acpi/acpica/psloop.c > +++ b/drivers/acpi/acpica/psloop.c > @@ -709,15 +709,20 @@ acpi_status acpi_ps_parse_loop(struct acpi_walk_state *walk_state) > } else > if ((walk_state-> > parse_flags & ACPI_PARSE_MODULE_LEVEL) > + && status != AE_CTRL_TRANSFER > && ACPI_FAILURE(status)) { > /* > - * ACPI_PARSE_MODULE_LEVEL means that we are loading a table by > - * executing it as a control method. However, if we encounter > - * an error while loading the table, we need to keep trying to > - * load the table rather than aborting the table load. Set the > - * status to AE_OK to proceed with the table load. If we get a > - * failure at this point, it means that the dispatcher got an > - * error while processing Op (most likely an AML operand error. > + * ACPI_PARSE_MODULE_LEVEL flag means that we are currently > + * loading a table by executing it as a control method. > + * However, if we encounter an error while loading the table, > + * we need to keep trying to load the table rather than > + * aborting the table load (setting the status to AE_OK > + * continues the table load). If we get a failure at this > + * point, it means that the dispatcher got an error while > + * processing Op (most likely an AML operand error) or a > + * control method was called from module level and the > + * dispatcher returned AE_CTRL_TRANSFER. In the latter case, > + * leave the status alone, there's nothing wrong with it. > */ > status = AE_OK; > } > -- Applied, thanks!