Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp2019865imu; Fri, 14 Dec 2018 04:36:44 -0800 (PST) X-Google-Smtp-Source: AFSGD/VlCGNvhxEve+hRbjt81iopZ/tptgCDgcBatRTGt3pLmS7rTamN/Gk36akKnSrzlgHzqy7G X-Received: by 2002:a62:ca05:: with SMTP id n5mr2707300pfg.154.1544791004456; Fri, 14 Dec 2018 04:36:44 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1544791004; cv=none; d=google.com; s=arc-20160816; b=n+W4wFXH0w9HWs38ivyz4pc9rirLrYAcuTuHkkgs+XCUg/hGAIv9lb9O5vUqechbj6 EChg5DDTwKkWZZLqoIGLmm/NwpUc6zBAlrRq/ifJZwA9NP4oH8mFEbtuz5hk4Sw929DF cq6OHdppYp8Oe15vP1jEoJCi5uXnLyBPEePE/PWHCvlXAqG9ze0iTQ48EKeH88lhrUQe D8oMj7eYyb82XTHeMjc0yTdyxZtlSDMLJxzSdqKOJpS4aPUWQ5ZEYrVuHgtPwh0m9oE0 7gICesueo8kvepjOvkcRT5RrZyPqzgerEkIuENMu1RNCeEx19J1PQl3IkK8htV0ynysk 1E5w== 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=wC1aooXT+H9vaFm/JmwJBF+9dLJsLmHJnS5l39Ko1es=; b=bxI66dAcSGVrXMFFypzRmfMdWEK/gOWkdtGAM+FqGpJ7t42tYQ85lvqJB/+o7QWhTg D6IFVtFI6KVxG8W9mZyyZf+qBqZisHKim7Nlf0GZBNj7pj6NfTxMUMmGxrvjm3g/8WM5 j3c0tkjK24ca+IJOB9DhSplO9oVxCqSVOUnbwhaIs8JUs0HTPC8I0vxn0o+CTSQghl2Q tR0vdf7/Nt9hPNJKK9Uiy9hTmD1mWBVDo7FA3OeFn/X43Z27Gl/6Q6CvU42r5R0n8G2y GNqJx6Lzvu9OyuMcnHkDUxJmi6R1qLnYxx+3cuW4PR4jrk3XIQNZXlhxHzZ9AAJb0U+U ImBg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=ceZVJtrA; 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 a24si3951032pgd.248.2018.12.14.04.36.29; Fri, 14 Dec 2018 04:36:44 -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=ceZVJtrA; 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 S1730771AbeLNMHO (ORCPT + 99 others); Fri, 14 Dec 2018 07:07:14 -0500 Received: from mail.kernel.org ([198.145.29.99]:52390 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731065AbeLNMHN (ORCPT ); Fri, 14 Dec 2018 07:07:13 -0500 Received: from localhost (5356596B.cm-6-7b.dynamic.ziggo.nl [83.86.89.107]) (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 CFD6A214AE; Fri, 14 Dec 2018 12:07:11 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1544789232; bh=Zs1RgRxu20lBi7Ta1dfkWJ2ExyMXLJPCDavy9ULf3cg=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=ceZVJtrAlPaIHGpNeccUdoX/oS4ehIxS9HWOAV1aYIoDvNKSXV4Ai6bWpkpJy7120 VAWu2pTvGS99ZyoNO457l3cQONokKYExVI7JZr+wTDWjiWaB8Z1H9kDEYIhT+Zlfex 50bCmkK+YNOFXPy7zqjAUW4LgOaYLe3TKMqEc48E= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Patrick Bellasi , Hanjun Guo , Will Deacon , Sudeep Holla , "Rafael J. Wysocki" , Lorenzo Pieralisi , Catalin Marinas , Sasha Levin Subject: [PATCH 4.19 123/142] ACPI/IORT: Fix iort_get_platform_device_domain() uninitialized pointer value Date: Fri, 14 Dec 2018 13:00:08 +0100 Message-Id: <20181214115751.954096793@linuxfoundation.org> X-Mailer: git-send-email 2.20.0 In-Reply-To: <20181214115747.053633987@linuxfoundation.org> References: <20181214115747.053633987@linuxfoundation.org> User-Agent: quilt/0.65 X-stable: review X-Patchwork-Hint: ignore 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. ------------------ [ Upstream commit ea2412dc21cc790335d319181dddc43682aef164 ] Running the Clang static analyzer on IORT code detected the following error: Logic error: Branch condition evaluates to a garbage value in iort_get_platform_device_domain() If the named component associated with a given device has no IORT mappings, iort_get_platform_device_domain() exits its MSI mapping loop with msi_parent pointer containing garbage, which can lead to erroneous code path execution. Initialize the msi_parent pointer, fixing the bug. Fixes: d4f54a186667 ("ACPI: platform: setup MSI domain for ACPI based platform device") Reported-by: Patrick Bellasi Reviewed-by: Hanjun Guo Acked-by: Will Deacon Cc: Sudeep Holla Cc: "Rafael J. Wysocki" Signed-off-by: Lorenzo Pieralisi Signed-off-by: Catalin Marinas Signed-off-by: Sasha Levin --- drivers/acpi/arm64/iort.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/acpi/arm64/iort.c b/drivers/acpi/arm64/iort.c index 08f26db2da7e..e938576e58cb 100644 --- a/drivers/acpi/arm64/iort.c +++ b/drivers/acpi/arm64/iort.c @@ -700,7 +700,7 @@ static void iort_set_device_domain(struct device *dev, */ static struct irq_domain *iort_get_platform_device_domain(struct device *dev) { - struct acpi_iort_node *node, *msi_parent; + struct acpi_iort_node *node, *msi_parent = NULL; struct fwnode_handle *iort_fwnode; struct acpi_iort_its_group *its; int i; -- 2.19.1