From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-20.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,MENTIONS_GIT_HOSTING,SPF_HELO_NONE,SPF_PASS, URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id D1CCFC4361B for ; Fri, 18 Dec 2020 18:41:29 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 8B94D23B74 for ; Fri, 18 Dec 2020 18:41:29 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729069AbgLRSl3 (ORCPT ); Fri, 18 Dec 2020 13:41:29 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42244 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728666AbgLRSl0 (ORCPT ); Fri, 18 Dec 2020 13:41:26 -0500 Received: from galois.linutronix.de (Galois.linutronix.de [IPv6:2a0a:51c0:0:12e:550::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D1E8DC061282 for ; Fri, 18 Dec 2020 10:40:45 -0800 (PST) Date: Fri, 18 Dec 2020 18:40:43 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1608316844; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=E4jfBfaAOGv+NSGS5a+O4lm+MKRAim9j7ZCYrPA3rmY=; b=4BQZxX1m3F9Enr1QWwY4AU8ompcLwX0n3EKSUAjePgodAmQLxICudxFeQ2HzomVoyRGUu7 xvbTNPCeD1u051/IMZnG8RQp3eQ9X8c26Usl+Cui2rhpEhm8F0Ma/mJKkJLIdpkqOyvSdU elLjsgE4hBd/SoC+t1XBiwOVHLF7CUBwy4evIpgavtUG8QCWeCIX3yGex686+JLKMX1R4E LgwA2X07jFPnTothD98dbVETAAklO03oVkfb0uTkiiAz0MlVHE9wJ3zZ6R0DZJYVM80BAP mzOzBgT/amK06RdDyI2eNbAxUqGjK953x55ZviJxumiBzFnu4Z7Cj9pmTU521Q== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1608316844; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=E4jfBfaAOGv+NSGS5a+O4lm+MKRAim9j7ZCYrPA3rmY=; b=KVZ3/0TlP6UHBHT4VkAJ9YKsTz9voOEAlnyv1tpgmRNlEcZMwSoelpz1WVoWZNEFXs++oj T24DLRaENPDREtBg== From: "irqchip-bot for Zenghui Yu" Sender: tip-bot2@linutronix.de Reply-to: linux-kernel@vger.kernel.org To: linux-kernel@vger.kernel.org Subject: [irqchip: irq/irqchip-next] genirq/msi: Initialize msi_alloc_info before calling msi_domain_prepare_irqs() Cc: Zenghui Yu , Marc Zyngier , tglx@linutronix.de In-Reply-To: <20201218060039.1770-1-yuzenghui@huawei.com> References: <20201218060039.1770-1-yuzenghui@huawei.com> MIME-Version: 1.0 Message-ID: <160831684367.22759.9553900200069848407.tip-bot2@tip-bot2> Robot-ID: Robot-Unsubscribe: Contact to get blacklisted from these emails Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit X-Spam: Yes Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The following commit has been merged into the irq/irqchip-next branch of irqchip: Commit-ID: 06fde695ee76429634c1e8c8c1154035aa61191e Gitweb: https://git.kernel.org/pub/scm/linux/kernel/git/maz/arm-platforms/06fde695ee76429634c1e8c8c1154035aa61191e Author: Zenghui Yu AuthorDate: Fri, 18 Dec 2020 14:00:39 +08:00 Committer: Marc Zyngier CommitterDate: Fri, 18 Dec 2020 17:42:18 genirq/msi: Initialize msi_alloc_info before calling msi_domain_prepare_irqs() Since commit 5fe71d271df8 ("irqchip/gic-v3-its: Tag ITS device as shared if allocating for a proxy device"), some of the devices are wrongly marked as "shared" by the ITS driver on systems equipped with the ITS(es). The problem is that the @info->flags may not be initialized anywhere and we end up looking at random bits on the stack. That's obviously not good. We can perform the initialization in the IRQ core layer before calling msi_domain_prepare_irqs(), which is neat enough. Fixes: 5fe71d271df8 ("irqchip/gic-v3-its: Tag ITS device as shared if allocating for a proxy device") Signed-off-by: Zenghui Yu Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20201218060039.1770-1-yuzenghui@huawei.com --- kernel/irq/msi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kernel/irq/msi.c b/kernel/irq/msi.c index 2c0c4d6..dc0e2d7 100644 --- a/kernel/irq/msi.c +++ b/kernel/irq/msi.c @@ -402,7 +402,7 @@ int __msi_domain_alloc_irqs(struct irq_domain *domain, struct device *dev, struct msi_domain_ops *ops = info->ops; struct irq_data *irq_data; struct msi_desc *desc; - msi_alloc_info_t arg; + msi_alloc_info_t arg = { }; int i, ret, virq; bool can_reserve;