Received: by 2002:a05:6a10:2726:0:0:0:0 with SMTP id ib38csp961747pxb; Wed, 6 Apr 2022 05:24:42 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwEFW82hELuRpjwYojCRNxFlSxhKtROPjDUAiLr/Zdu88h6D1+KXu7J1QgOQZ8TCBXghZws X-Received: by 2002:a17:902:dacc:b0:156:a0c5:3162 with SMTP id q12-20020a170902dacc00b00156a0c53162mr8369676plx.123.1649247882338; Wed, 06 Apr 2022 05:24:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1649247882; cv=none; d=google.com; s=arc-20160816; b=pooOVD5TUZcAXVtt/LaEV15JZNsYPBeQ60gIlVW5E/wBzFL6+tRoCWMhA8HwH9tAib 9z0kPt68R/+BnH1oAZcHK5cAgyzyrlp9Ld3oBKbUV70voE8NtcQoNqxJpvQTCGFMpR2g CnmamMCjlYE1EPgFIZBAsD56EJ9l3Hhu7PIFcDNoIE5UQgtJVu6GCNW25Wx8m6R82ZAB Dw4z/zJF/WW3TRE8R1kJl5ptz0i2HfPu97eyT5LJ8S9qzQmdD0rly83PZDBIrWGqZV7T 6O22vDx75650Y1F5pZ37nVeNIC7CdZ4RHG5kg6hOaP5B+mW9XeljesBFqBtxaZ8vkFPp BhUg== 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=mH2DusimCeJvg1UhEpdB9+MXWNLQ74XiniFf4Z0nLbo=; b=yUFe3caA0hrCA21Wi9tLcI0+H/5/24ycuGCgQfa0KDM028aSjx8x8dsoZoe4hgFZqC dOwUSBlUZR8YivF736nuso5hmZeAhydEO6QGb/6QqMUS8ZAzbchUAGBxqhNMkC+n1CWq i/0+1Yqc8wKvWMBOiqQApf5v4ankLJOn7467zgUDY4kHzQze3KqkOwqrdqOQwInGOwfX 2tpaEqMNkzVNbUOnwyV4RgKbzo+94zLkIrPqlZaC7f2u6qOF5qz732uXbjHy9wDmsjf+ o7M2TluGBrZOrHhqEv9wOkPM67CV13bZKSKNon4yoWgbGOLpIxZfrguLWRmGUcK0ixeP bEtg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=PD4ktcCQ; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1: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 lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id r1-20020a63a541000000b003816043f09fsi15471974pgu.660.2022.04.06.05.24.41 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 06 Apr 2022 05:24:42 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) client-ip=2620:137:e000::1:18; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=PD4ktcCQ; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1: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: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 0114C574C7B; Wed, 6 Apr 2022 04:34:19 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233018AbiDEJZf (ORCPT + 99 others); Tue, 5 Apr 2022 05:25:35 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34720 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S239654AbiDEIUY (ORCPT ); Tue, 5 Apr 2022 04:20:24 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D532231A; Tue, 5 Apr 2022 01:18:24 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 6FE7860B0E; Tue, 5 Apr 2022 08:18:24 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 74F1BC385A4; Tue, 5 Apr 2022 08:18:23 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1649146703; bh=0koZQSOLgRW2kaRazCNUDwDk9THdGrokMdcTAp4Ow68=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=PD4ktcCQESHGqi3i90p/e+wQ/GDgMu4aYn4tBPSXpTRDbBgmnttUqLrzI5DxEa/bm PBDf74q21y36Ze+8Nq1Q1CQEezM3OSKEr9o98K9XfDc1MMzvbvryOQM2BuP45FZHUQ JLlvnSQgJUUbui6AejzHQpIVmB6s10z0kcmXvOkU= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Hans de Goede , "Rafael J. Wysocki" , Sasha Levin Subject: [PATCH 5.17 0858/1126] ACPICA: Avoid walking the ACPI Namespace if it is not there Date: Tue, 5 Apr 2022 09:26:45 +0200 Message-Id: <20220405070432.726370341@linuxfoundation.org> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220405070407.513532867@linuxfoundation.org> References: <20220405070407.513532867@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RDNS_NONE,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Rafael J. Wysocki [ Upstream commit 0c9992315e738e7d6e927ef36839a466b080dba6 ] ACPICA commit b1c3656ef4950098e530be68d4b589584f06cddc Prevent acpi_ns_walk_namespace() from crashing when called with start_node equal to ACPI_ROOT_OBJECT if the Namespace has not been instantiated yet and acpi_gbl_root_node is NULL. For instance, this can happen if the kernel is run with "acpi=off" in the command line. Link: https://github.com/acpica/acpica/commit/b1c3656ef4950098e530be68d4b589584f06cddc Link: https://lore.kernel.org/linux-acpi/CAJZ5v0hJWW_vZ3wwajE7xT38aWjY7cZyvqMJpXHzUL98-SiCVQ@mail.gmail.com/ Reported-by: Hans de Goede Signed-off-by: Rafael J. Wysocki Signed-off-by: Sasha Levin --- drivers/acpi/acpica/nswalk.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/acpi/acpica/nswalk.c b/drivers/acpi/acpica/nswalk.c index 915c2433463d..e7c30ce06e18 100644 --- a/drivers/acpi/acpica/nswalk.c +++ b/drivers/acpi/acpica/nswalk.c @@ -169,6 +169,9 @@ acpi_ns_walk_namespace(acpi_object_type type, if (start_node == ACPI_ROOT_OBJECT) { start_node = acpi_gbl_root_node; + if (!start_node) { + return_ACPI_STATUS(AE_NO_NAMESPACE); + } } /* Null child means "get first node" */ -- 2.34.1