Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp9092179pxu; Mon, 28 Dec 2020 06:26:57 -0800 (PST) X-Google-Smtp-Source: ABdhPJzKzs3a969EogQeMydBRpgAZOQ0ZwiVR3ZerQ+IsUfxL5FHL8PFo9qZNZnBxANPT4l4u7m+ X-Received: by 2002:a17:907:a96:: with SMTP id by22mr40308619ejc.171.1609165617003; Mon, 28 Dec 2020 06:26:57 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1609165616; cv=none; d=google.com; s=arc-20160816; b=QlOabeD8rAVlzE0VeqldKEX9cxE8a0sGjIN7VOLkwe90jwmBpdUD3CTNWVK3CVjYRa oJ/I2+xlY9fy6FWgoedTCr4Mmcq/wtUkCdCv87n0WEnk20kOJT/qsA06KZtdyqO8uPzB +Zyx/vKwhd8/dQsZd0p8YXz6BldLE2QKhW7/hAOy4ifS8NypoV3uTdKITLwLs8vfGDiz q4Fp96xAmszGhzaWiYRJmT5hqc0OjH08SAsXSIL/ridby5wiRZ4shUMgUq+f1CgwQiwD Pa47kpprSCIWg2ZcqJIW4bdvR46sgTKBY+ciMmzCbEGmxr9IijBXEyBZgT22rRntKs63 t9Gg== 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=YhVv3YO/P4s7s9/ai7afxn3I3iYnaH3A1DjAad614XI=; b=Q/bU0tZUwMFundX9KWYSJ9f/elxXIY//I2Wpg7622my66YJUjDCbXL3XixQTOjuEp5 cipWkrZNpVEnRz+3gZTQ+Mtc+UQhvhTiazBtWf1Y13F0QfRk7qMkVBCRIu5OoofOWb0M F4/WxkHeAhqsfDGRhRHSzC+XkWf2vvUOgmmAibKTTM3NppTSiaj76m009hU5X2wHceji vKCcXBMPkKKiWzyN8Weph/H0meSU9M1kmhix03kxA8gbw5b3kyb1BfJY3mH1shO5/oI2 0mH+H+krCE1azOJJ72B/6LO4eNel8++FkBSN/tLm/Hg4mf5xc1zUtKapbTVyVbad8Y9a 34ew== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=jl9STrmU; 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 g11si12616532edt.456.2020.12.28.06.26.34; Mon, 28 Dec 2020 06:26:56 -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=jl9STrmU; 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 S2503059AbgL1OYW (ORCPT + 99 others); Mon, 28 Dec 2020 09:24:22 -0500 Received: from mail.kernel.org ([198.145.29.99]:60164 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2503005AbgL1OYT (ORCPT ); Mon, 28 Dec 2020 09:24:19 -0500 Received: by mail.kernel.org (Postfix) with ESMTPSA id 584DC22B3B; Mon, 28 Dec 2020 14:24:03 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1609165443; bh=ycu+JE1DE1QEQDhy6MtUTnnqk2x6wQmu47w4i+VT+l0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=jl9STrmU2LpkWW4MQWIkLI5ZPiwP1IZ2YEeIMJ7XZdd+yDy2HeZAEcGduPnPfcNPw C5wBJf00tn8p6mZe9J3+aaFyUYTgUmc9pOYBuoaBxHC/n+kuJI+xVqQphomk7U9D9e VHqz2sDd4M9eD5CBeUdxKSw/7AWUnINCiTByZql8= 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 5.10 533/717] Revert "ACPI / resources: Use AE_CTRL_TERMINATE to terminate resources walks" Date: Mon, 28 Dec 2020 13:48:51 +0100 Message-Id: <20201228125046.506749180@linuxfoundation.org> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20201228125020.963311703@linuxfoundation.org> References: <20201228125020.963311703@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 @@ -541,7 +541,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; }