Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp3489229imu; Sun, 11 Nov 2018 16:15:16 -0800 (PST) X-Google-Smtp-Source: AJdET5ejXuJsmAhjTpLmwNPC6s2Sj4HJm+pGr/YPkMSKxxCxAKA/BiqSnZmHX8GxYFbEKQqLUin/ X-Received: by 2002:a17:902:20eb:: with SMTP id v40-v6mr8356978plg.234.1541981716682; Sun, 11 Nov 2018 16:15:16 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1541981716; cv=none; d=google.com; s=arc-20160816; b=yo2yF8N0YyN+3rY0j+aRLluX+cApmM2hXOkoYQjntqySBD5KDTJ3qyYGWYEc9X9muG gKMBVTuZpekZwvv65yIUkVN+3yLKB/biuDgECHDUbvhJS1aCZTHb+BouCbYUjJzOR5K4 UxghKRgvEHEKtbNwu6B+cJ2tTd4hzvGBIZuXyPaHuc5VaZDAyNDW8CusRokDZHvNEPM8 E29RlJhAkN2XkHLU2CLEAey0TAyl7/mMr6US5wmzzzmLDQnJX+8RRNUxTZSAWOW3fmE8 TCaPmwfmyuehG7ncQ+WYx5Q50k3dy/NYSHxiDLw+I6gO8UCTkpD/M2iyZWtzH/a9/yd9 cuwA== 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=PlT7if4elOCWn+kUiMTuGjU10Qzt4t9Ft9Qkx/w5oBU=; b=v6Ywx9l4KENTfgUVZaWaAIH6h+cYsdN4QaoEMXz6FB7RZaWFVF7TISEF9fWyjzb3aZ QcSzM3xuchXaMKVSVOcvE67DAazFgq5F0BtjifYKE/QOsgN3Gdh36px5hxx0hDC0jQ1c Ed6oVB/u2m5Wa1BKVpi0wOamsk7RvpXw4vb0dycpc5dlJHf0VfZ48wC//xLFZQ+VslKB qDYkrnjh6wjforzKk5ZeFtzDRsebrKTmZq9Czqg+PBHEgGbVteNCW6rF6Ab412f6Cn2d Neb8Xv9MdytoCsmLOJy4tiPIkYqMp4tf8BaTi3B6+EqvRKFm5Jc+/jozkd28O5naBdDZ X91A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=2S0Qq0mV; 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 t4si14180555pga.83.2018.11.11.16.15.01; Sun, 11 Nov 2018 16:15:16 -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=2S0Qq0mV; 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 S1730502AbeKLIRP (ORCPT + 99 others); Mon, 12 Nov 2018 03:17:15 -0500 Received: from mail.kernel.org ([198.145.29.99]:59948 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730385AbeKLIRP (ORCPT ); Mon, 12 Nov 2018 03:17:15 -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 9E11E21527; Sun, 11 Nov 2018 22:27:19 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1541975239; bh=ZS7I+ZhbHOQF2RaaUxaJmL7R2ZtgEegalzzQr6Tqbtc=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=2S0Qq0mVgmSWMTUCZwJg5iT6iP4ODLaCxCGj3v4F3O5eb3DXZARLyqjIKzrKCD29y nKTIwokLBtn78vCboQ4NGeKFTtNxF69Yg2X128Wk27K+V9raifErc1JztwY/mQPQEZ 3u5JN9TZ5L0oe7sqdqXomocUosOcspcx2kcnY/0Y= 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.19 081/361] ACPI / processor: Fix the return value of acpi_processor_ids_walk() Date: Sun, 11 Nov 2018 14:17:08 -0800 Message-Id: <20181111221631.288215540@linuxfoundation.org> X-Mailer: git-send-email 2.19.1 In-Reply-To: <20181111221619.915519183@linuxfoundation.org> References: <20181111221619.915519183@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.19-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 @@ -643,7 +643,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: @@ -663,11 +663,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; }