Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp3438543imu; Sun, 11 Nov 2018 15:06:28 -0800 (PST) X-Google-Smtp-Source: AJdET5eSggAZ3PqY5m2QT08yFnofM/2PlgQEuCopYqCCsRjVpc5eSM6vXb3O5DoSYFhvacldxOXD X-Received: by 2002:a63:e055:: with SMTP id n21mr15559855pgj.397.1541977588740; Sun, 11 Nov 2018 15:06:28 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1541977588; cv=none; d=google.com; s=arc-20160816; b=mwJDx4mutudd1tc+e1Z0+mwyzOR7v5meSRF9FIGbinRK7sOWLt0+U5wgmiacqpNII7 ZEx74PS+vhs1wqMkJiKy4UsuJ8iD3FCihYifyiSi+de8qJAW8upBBn7WUHhdsc8ImTIT qZhLXMbBesfufNmk1pbMgZ1uLyZ/EnNc0km/2anQSHjJE/NKkshdHbgUddS/lIgUEO4s SZwrQGFtaHGVJi+4Aa/Ryuq0zNoUv/aQsoPy4GfWKUDKiU0aQznfJYsH5RoI4Z+RAiQT io8n3C1m5lAFkHQ4OsA98ieEdC/JY1gS60pvz7+NkCKmwCM/CujmngsDXeNcTSWBU6uZ d2kA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=hkYaLvNllaiUBCV4tOCoyyeYFTfkg0b4paahvpncapA=; b=Z3/YX6TZ8Ju+Il6J3DgFdmHi8cKUssstP5QiNnCrrNbPNIfSlYtU6HcH2U3y09ab78 QsKjTKYbkDcmd+Hf7cYQwLRoiLowzutj1XzkEgvoMdZNHWa3RAn+Q5ZWk41NG24DyXma J6EgecP967jr3SlbRNtKIjxnlKAXc5BInwUXPWHXmXbtpA7zuvh5JYzCED9q0T48sJ+x msT1OpboVWjdMTOaQ/1UsA+/syRwlkqi5lBOP/DqMbeBTr/g6gZTMoe+FavkpFYgCX/w sdT0ONIfS/q/sV4pYRzvCvJixL1SSxGot5DxVYfWSbaRF8Q8ctsAlKveFk1Qr4s3vxtW LvKg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=Q+NMOOry; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id cc8-v6si17859366plb.377.2018.11.11.15.06.13; Sun, 11 Nov 2018 15:06:28 -0800 (PST) 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=pass header.i=@kernel.org header.s=default header.b=Q+NMOOry; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2390605AbeKLIz7 (ORCPT + 99 others); Mon, 12 Nov 2018 03:55:59 -0500 Received: from mail.kernel.org ([198.145.29.99]:51200 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2390410AbeKLIWO (ORCPT ); Mon, 12 Nov 2018 03:22:14 -0500 Received: from localhost (unknown [206.108.79.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id A1F7F224B3; Sun, 11 Nov 2018 22:32:17 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1541975537; bh=MR3DE5l92liLMqe7JRgxMkNx69/XLjyCay1bw6ySx4c=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Q+NMOOryDXnqr7k/P1qK+btz1mTzPwELSExshkjAvlupQT2qFS4AdAfgIW7xhons7 BsYPd6rA4LetW8QPplTvHbE1GHNWjagf/yVx9LXxH51yzFhx58lsmtkgTkaU/oiUfl Caw/APWMuQ99/HqnyuggxxpR+xmvNLAzNpwMPO9k= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Dou Liyang , "Rafael J. Wysocki" , Sasha Levin Subject: [PATCH 4.14 056/222] ACPI / processor: Fix the return value of acpi_processor_ids_walk() Date: Sun, 11 Nov 2018 14:22:33 -0800 Message-Id: <20181111221653.057260326@linuxfoundation.org> X-Mailer: git-send-email 2.19.1 In-Reply-To: <20181111221647.665769131@linuxfoundation.org> References: <20181111221647.665769131@linuxfoundation.org> User-Agent: quilt/0.65 X-stable: review MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 4.14-stable review patch. If anyone has any objections, please let me know. ------------------ From: Dou Liyang [ Upstream commit d0381bf4f80c571dde1244fe5b85dc35e8b3f546 ] ACPI driver should make sure all the processor IDs in their ACPI Namespace are unique. the driver performs a depth-first walk of the namespace tree and calls the acpi_processor_ids_walk() to check the duplicate IDs. But, the acpi_processor_ids_walk() mistakes the return value. If a processor is checked, it returns true which causes the walk break immediately, and other processors will never be checked. Repace the value with AE_OK which is the standard acpi_status value. And don't abort the namespace walk even on error. Fixes: 8c8cb30f49b8 (acpi/processor: Implement DEVICE operator for processor enumeration) Signed-off-by: Dou Liyang Signed-off-by: Rafael J. Wysocki Signed-off-by: Sasha Levin Signed-off-by: Greg Kroah-Hartman --- drivers/acpi/acpi_processor.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) --- a/drivers/acpi/acpi_processor.c +++ b/drivers/acpi/acpi_processor.c @@ -642,7 +642,7 @@ static acpi_status __init acpi_processor status = acpi_get_type(handle, &acpi_type); if (ACPI_FAILURE(status)) - return false; + return status; switch (acpi_type) { case ACPI_TYPE_PROCESSOR: @@ -662,11 +662,12 @@ static acpi_status __init acpi_processor } processor_validated_ids_update(uid); - return true; + return AE_OK; err: + /* Exit on error, but don't abort the namespace walk */ acpi_handle_info(handle, "Invalid processor object\n"); - return false; + return AE_OK; }