Received: by 2002:a05:6a11:4021:0:0:0:0 with SMTP id ky33csp2319269pxb; Mon, 20 Sep 2021 18:42:15 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzH5TV5f/795arwGZeGY0ulNB9xSZNHwRG6WVXb0SHB/yOvGqfMMRbe7CMkDeOrrpC7pqJe X-Received: by 2002:a05:6638:224c:: with SMTP id m12mr18268950jas.39.1632188535725; Mon, 20 Sep 2021 18:42:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1632188535; cv=none; d=google.com; s=arc-20160816; b=d148wzeX8fBsnn90H1d6A5pZMbIuSCyUAlFHf3cEwnWrBnSlPFm0Y31gdvBmrbrIaA 7Bx3X6RS7kZyS7Ct6nlIRldz5qPcggyEQl1JTobY4eb7sv8OR60Kp9JqtmdUwYUaqrFm iuUbBtKHEUKqrHbpIpDrM0VFQ52tNsm+YzYjzaTq1EvSui85i//RvpQShubc8Tds+E3F qjRJfrRQYPxzduXlZXAmKEPjzArCUryl9qOFjKV5RZ3rFZmbktjehGqgh3ZYPqkb9rmF 4BFqXTHmfMlGXJ3hWN8hbRHrBpAI7Gj3Z/+FNLCRmu5ztW8mMh03eDT9RQKzCdZul2kX CMpw== 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=76fcZt3eDXu8rMEPqHBY+ocx3SSICFwED+goSYIJfaA=; b=VJWXi3dsjROCjWYmC0yIWeRJQ2WWHzJPbDcVrATUhJbLtmisNFOMjOn6t8UJTDDyVA lZ/jXCCC2w8fGRNeDBKRV1xfoGDUrlvb0tfWAgthT/iJ0lIbNKEhNoifmf2OrjTqiKJB KMLksOqpRwfUFSaGdVveweV9b5zCgkXIdhtxvCa9y7eOJzfLHbRRRR541BK2vjHjxfvH Sha+yHMTkgqz1gtvTyJKPKfO1t9cTUNbR8pOJ3Gb2Q1t1IHpc6Y0Sy62SyRk8Xk21W/W DFQu3sky3zF8N9IwUmHVvwTwouuFZJDfEh1uK93RGQHcTQ/EIwgbH1/FvdQlEuuYcvli Uebg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=YcaY6VTn; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.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 vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id t6si13775382jaa.130.2021.09.20.18.42.04; Mon, 20 Sep 2021 18:42:15 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=YcaY6VTn; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.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: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S245142AbhITQwo (ORCPT + 99 others); Mon, 20 Sep 2021 12:52:44 -0400 Received: from mail.kernel.org ([198.145.29.99]:38940 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S244081AbhITQuB (ORCPT ); Mon, 20 Sep 2021 12:50:01 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 719F961245; Mon, 20 Sep 2021 16:48:30 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1632156510; bh=QM53qf0i/7e0dwga1vWh5MnbgvfUlKtIQfgN/VKBaBU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=YcaY6VTnVmwgfVtC53MOLgozW7RJIOLOfdVpG7yusdcQzXd1Wd93xRjt/3Ws3Pzhq 3RpmYtpAgLsaEe/VuWU225dLODV2Hq8NyjRTrYveU4L5MPiL19++kcQ6Pm4lgRM/8Y vtZNWz2yS4e4zP1oHy5LjY6XjKxNS+Zh30ZFahH4= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Jonas Jensen , Vinod Koul , Peter Ujfalusi , Tony Lindgren , Ulf Hansson , Sasha Levin Subject: [PATCH 4.4 061/133] mmc: moxart: Fix issue with uninitialized dma_slave_config Date: Mon, 20 Sep 2021 18:42:19 +0200 Message-Id: <20210920163914.647749159@linuxfoundation.org> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20210920163912.603434365@linuxfoundation.org> References: <20210920163912.603434365@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Tony Lindgren [ Upstream commit ee5165354d498e5bceb0b386e480ac84c5f8c28c ] Depending on the DMA driver being used, the struct dma_slave_config may need to be initialized to zero for the unused data. For example, we have three DMA drivers using src_port_window_size and dst_port_window_size. If these are left uninitialized, it can cause DMA failures. For moxart, this is probably not currently an issue but is still good to fix though. Fixes: 1b66e94e6b99 ("mmc: moxart: Add MOXA ART SD/MMC driver") Cc: Jonas Jensen Cc: Vinod Koul Cc: Peter Ujfalusi Signed-off-by: Tony Lindgren Link: https://lore.kernel.org/r/20210810081644.19353-3-tony@atomide.com Signed-off-by: Ulf Hansson Signed-off-by: Sasha Levin --- drivers/mmc/host/moxart-mmc.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/mmc/host/moxart-mmc.c b/drivers/mmc/host/moxart-mmc.c index bbad309679cf..41a5493cb68d 100644 --- a/drivers/mmc/host/moxart-mmc.c +++ b/drivers/mmc/host/moxart-mmc.c @@ -633,6 +633,7 @@ static int moxart_probe(struct platform_device *pdev) host->dma_chan_tx, host->dma_chan_rx); host->have_dma = true; + memset(&cfg, 0, sizeof(cfg)); cfg.src_addr_width = DMA_SLAVE_BUSWIDTH_4_BYTES; cfg.dst_addr_width = DMA_SLAVE_BUSWIDTH_4_BYTES; -- 2.30.2