Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp9181343pxu; Mon, 28 Dec 2020 08:36:11 -0800 (PST) X-Google-Smtp-Source: ABdhPJzIbrKhD8rZY34H7alB/mKQaAHvdt8kxSHn7tIFj8pHoaK0wTVvYztaYOak0pgSv7iLb+Ka X-Received: by 2002:a50:fb85:: with SMTP id e5mr42419772edq.153.1609173371723; Mon, 28 Dec 2020 08:36:11 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1609173371; cv=none; d=google.com; s=arc-20160816; b=MPQjX5QDhrUa/+yR6+GEUxg+jcMw/sHVCb0TJrIXYitGZA72NB1QmyVr0Cxoc1ffei q0hkRLw1SVL7s0xZ9RjZ6fTp9si4vwZmEp4cuHKSOc7FhiDWWICsKn3nA7KKLWLJjL70 AHHfaaBHeBcs1nTMIS5SbxZ77sH/djFbIf3vpUu8kOm9v57lCTpeF/mS844Lx8d2OyPL NBqXxeC5UJ5qeJOfoB9pzg/k9ZIiDSlx9XJa9rzU30u2v2MJvpno+bLI0HSZBgw9++lL rJ67IM++89gR+KzAmJdN8D0lbNlCFMc61Xka5OI34Agad7rzrf+BeLAC0Yt/MI0IE6zv FodA== 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=wchGRo5lmchaeWFaDFCFrqdLebiRshVOLnCZ3Xpntsk=; b=zw75HDKPGL8wcwnqrUQ6jQHa2N4qb/ECxa+Ojy94CW8AtZL9sh8nixobLV5xiDKwYX CjIYuu4mODre1w8XGkwQwNmv21A1QEblxaE+/pr55AxBJbvr4o2I01CWANZ049oA5QSB oo1lRXoTiRMlJOXZw/lE/aJB5FTBfjydsMjpO3dOB0B+pxKoqqmANNrdjgspGDr8ONS6 QDYj31wMpTbvrRJY52QHD1KcLPqySeQUpKt7+8Yl+XdpSd8pYDvtvjACdZ2S3YKX1fRw Hp/tZ0omfqiayKLarvlq1WdfVbFrn6l8KgRbfRl1GOKcfVFpPkDEONIsbEvxF579/gXB vG9w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=1S77OCWz; 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 ch17si20378028edb.430.2020.12.28.08.35.49; Mon, 28 Dec 2020 08:36:11 -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=1S77OCWz; 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 S2633537AbgL1QdC (ORCPT + 99 others); Mon, 28 Dec 2020 11:33:02 -0500 Received: from mail.kernel.org ([198.145.29.99]:33246 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729849AbgL1NFW (ORCPT ); Mon, 28 Dec 2020 08:05:22 -0500 Received: by mail.kernel.org (Postfix) with ESMTPSA id 7692B208B6; Mon, 28 Dec 2020 13:04:41 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1609160682; bh=IaOJYKUmy9GSwpodXH1qaeXbqk96Ux5wgeJUHdrUMM0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=1S77OCWzUEIKuE3jA1pl0oT/R/aXvdAH3/BjoKfX+UbrTbLotlsiMXLb6BOqIjy++ PdxEzu+K0hZUw3lg47dJGV0oAlj4uI5o4WG6t6HgvQxtsYcWZ8Ac7RrXW4zUFR3EFz wcZZsGijwv7TM2/5o8JP8DfUISkfFh5o19XbAzO0= 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.9 135/175] Revert "ACPI / resources: Use AE_CTRL_TERMINATE to terminate resources walks" Date: Mon, 28 Dec 2020 13:49:48 +0100 Message-Id: <20201228124859.785375000@linuxfoundation.org> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20201228124853.216621466@linuxfoundation.org> References: <20201228124853.216621466@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 @@ -532,7 +532,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; }