Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp9047537pxu; Mon, 28 Dec 2020 05:21:33 -0800 (PST) X-Google-Smtp-Source: ABdhPJxUCokIi/Pxr1ibLN8122FHf9qn4ueuF29taspSyABR9+/2vclJlykiJUjE1fkIIs5DEsJE X-Received: by 2002:a17:906:890:: with SMTP id n16mr41904468eje.463.1609161693603; Mon, 28 Dec 2020 05:21:33 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1609161693; cv=none; d=google.com; s=arc-20160816; b=yDUljUv0OSGKwNMKEfREXmRVoE9bCnnBUcEf2uRAn7B4U06I97cdbT37Z9yDlSSg96 oAhOrbbX5IRT3p4u4sb/G0hjOT1QpnLb0lV1Pd2JAh+Y3zwcUKR++uBPWsRQTTVp5pWE OXfFo2tU093vNNhbIjFC7ZLlBkdvGjqMov3fcDC/GUIFbS34qdaSPAW+QB+Fn8LMKLzQ G4MWcWFMh6NNvCcccj5n+ns+43FKB1FqNPa3aLkQRHhx+3ob5B9VkEpYEzbBqeBbGzO+ z15T7N8fk/wUq306h9ep8dPJEqPPw5tSVsooTNDFcdP7A9dIe4p4Yi2CVbJ/rdrKafz1 6sQQ== 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=HU2p5L62L3F89pWryzwrEebWdTpkyBjX41Z/s+5YsCc=; b=ye38w4bnQsjGHg1D59lDfyW7WchdcDI7Hjw++QsbOjkPHL/rFuKCVjT5wnXUzYiO9G QPVoBWZ8fiiq9pfizlL2YVDZDfAvmlTcXMJJaJkcY+04zvqRY8d44HHRQfyFJQdpCZFf A7eaHZIHiNmUFdF0FRtcp+O4p9MbWIfFP9DlsiaN5M0QTitRocuQ1IEiXX4TLFg3q1KR tWxFmqBIfg4QdA1uJDu2GMjTYQFU2DqU0N5bZIf9h9SReb7B4lPuADopfoIqR8Q4eSLY g2SxahmXgWzRQMfOZ4MRoJ8KkjQWeKobA/qtxRVtZvZ0mfwZN70izyY1cF3ty+A8zuI/ Y29g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=i7NIHAg+; 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 w10si21695217edv.243.2020.12.28.05.21.09; Mon, 28 Dec 2020 05:21:33 -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=i7NIHAg+; 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 S1733273AbgL1NQi (ORCPT + 99 others); Mon, 28 Dec 2020 08:16:38 -0500 Received: from mail.kernel.org ([198.145.29.99]:44940 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1733219AbgL1NQc (ORCPT ); Mon, 28 Dec 2020 08:16:32 -0500 Received: by mail.kernel.org (Postfix) with ESMTPSA id 267AF21D94; Mon, 28 Dec 2020 13:15:50 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1609161351; bh=uCSZ2S0uiBhH2ima5mqECjLF01VKfsPu/to1MACyatg=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=i7NIHAg+fu5DUeOKsKD2okBe2r99G9HaIklDxH5AHB+78iSQkFrVNAHOSxXSjSxSi /XOrX7aVykP2snTltjqNQ2pNi6yNMwr1U0upQteD49dZNYEjyO+cB796JQpCLSe+ej ZQWqCg8g93r7FVNeCWsRtHMqY2FsB7L6iTZawVyI= 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.14 186/242] Revert "ACPI / resources: Use AE_CTRL_TERMINATE to terminate resources walks" Date: Mon, 28 Dec 2020 13:49:51 +0100 Message-Id: <20201228124913.851374622@linuxfoundation.org> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20201228124904.654293249@linuxfoundation.org> References: <20201228124904.654293249@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 @@ -548,7 +548,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; }