Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp9457564pxu; Mon, 28 Dec 2020 17:15:29 -0800 (PST) X-Google-Smtp-Source: ABdhPJyg9sEMT/JbxglVrC54vgkvLCWwTgZ3zZbH0Z91jZ2jgjmZgGXwaVme0ObwuEYJDMdLYg0o X-Received: by 2002:a17:906:5285:: with SMTP id c5mr31908725ejm.17.1609204529076; Mon, 28 Dec 2020 17:15:29 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1609204529; cv=none; d=google.com; s=arc-20160816; b=ljBBEYWj9SP29WciKtDIdcLd1AXWYOzy9GCvi66kYPI5UgYgOORFjQ8jZzECyRXnPa TwgEx0IipHAXmPvo7dQWmL9yBhRAimLEiV121UctndLfinW1F8sSP4HDnAlYloIIq4tS XEk4xxfKQxGhbO727VgJy29YycxRgUPNwR8U4wIy6CUHZ7YeQ1f4+JEkjwrFwcz+K3BJ m79IzMemhOnRGwLQ3ktcsd8ykRWmDZKMhcmGPK0wSGw0FyClVA44Nr7b4N3u99G1++1h kKCbcksWxWsF1XOPf66K0Uuiq6SGwFLaqgC90Z55xWdE6dLXQ6VJT0V79ZnobOGk1RPm C7HQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=+3g/dR0Tvn5dBfMK768AZc3IsEk/ZDwzbolDHvr14fY=; b=0R93CCSsvpq/Ud8vFu4ely8ggn9afehEBtm8rXKNcrHmxqAR4TzED+pgmWkmyx+hO9 FWf9WXVTpUh/T63jKESGK0AaZ1g7WWjeRwp6FQTe8ehcHKpV7YJn7lhtOYPAswoBh+mI DauyBwErxEhhAyRuUHrZgohYgkqaM653XmwPvrdLaMPMioRRwaU2bLzX2YtDxENhaxkM 4VDumZYkUvBKprXNAg2lydZivHxInYM/uNFOUBil6cI+lIyS++/EMnOQxAse9bWFrfh8 Q4xKkMJOFQ8+ZeiY+KH7MoY6NiiOVyfP+5jO6+6J1C4LxRiwLSXx34sAC7UwiMRnMUaN TXcA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b="gFM/99Rd"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id cw14si20335638edb.289.2020.12.28.17.15.07; Mon, 28 Dec 2020 17:15:29 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b="gFM/99Rd"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2441105AbgL1QpO (ORCPT + 99 others); Mon, 28 Dec 2020 11:45:14 -0500 Received: from mail.kernel.org ([198.145.29.99]:52962 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728831AbgL1M4t (ORCPT ); Mon, 28 Dec 2020 07:56:49 -0500 Received: by mail.kernel.org (Postfix) with ESMTPSA id 3FEFC208D5; Mon, 28 Dec 2020 12:56:33 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1609160193; bh=fI4JeCBIOMgmJEBljdtZVIXUtoKF/x3OGmUcqh+eO+w=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=gFM/99Rd+cGU7KNzdUU0oIPc0r434DlpilqSEQJa3MakKbHroGAPYxN55Ne6ATPyi JgPsQX6KaEtob+PzGILbeCvhyNNGtPmGJiiZfJCOWgIzJ+f6Nq5H8DE9dFl1/3N7nm NHGAB9OcWOAkntbHodgYcWH+IbPtSdZU11JcdsaQ= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Daniel Scally , "Rafael J. Wysocki" Subject: [PATCH 4.4 101/132] Revert "ACPI / resources: Use AE_CTRL_TERMINATE to terminate resources walks" Date: Mon, 28 Dec 2020 13:49:45 +0100 Message-Id: <20201228124851.300725133@linuxfoundation.org> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20201228124846.409999325@linuxfoundation.org> References: <20201228124846.409999325@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Daniel Scally commit 12fc4dad94dfac25599f31257aac181c691ca96f upstream. This reverts commit 8a66790b7850a6669129af078768a1d42076a0ef. Switching this function to AE_CTRL_TERMINATE broke the documented behaviour of acpi_dev_get_resources() - AE_CTRL_TERMINATE does not, in fact, terminate the resource walk because acpi_walk_resource_buffer() ignores it (specifically converting it to AE_OK), referring to that value as "an OK termination by the user function". This means that acpi_dev_get_resources() does not abort processing when the preproc function returns a negative value. Signed-off-by: Daniel Scally Cc: 3.10+ # 3.10+ Signed-off-by: Rafael J. Wysocki Signed-off-by: Greg Kroah-Hartman --- drivers/acpi/resource.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/drivers/acpi/resource.c +++ b/drivers/acpi/resource.c @@ -506,7 +506,7 @@ static acpi_status acpi_dev_process_reso ret = c->preproc(ares, c->preproc_data); if (ret < 0) { c->error = ret; - return AE_CTRL_TERMINATE; + return AE_ABORT_METHOD; } else if (ret > 0) { return AE_OK; }