Received: by 2002:a05:6520:4d:b0:139:a872:a4c9 with SMTP id i13csp2563800lkm; Mon, 20 Sep 2021 18:49:33 -0700 (PDT) X-Google-Smtp-Source: ABdhPJw4aOicEc4eIMwpvkloarwGnf307KHB/SNuTstknrWI3dZRjLU5AP8/P6ok6pk4fEeUwBoy X-Received: by 2002:a02:b91a:: with SMTP id v26mr9548098jan.78.1632188973165; Mon, 20 Sep 2021 18:49:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1632188973; cv=none; d=google.com; s=arc-20160816; b=OvOQAokQCHuDVZvMHFrgJhrplSohvnnacNQ3FUtVil5GyDFrwKnI9MVZNHS4YhuDxl 0KZ7hFz3umh1T/W7sdnU9H8o+v6nTPqK5pqdOqFK3NBrj+d7afLBwAUs6578GVFJiCcd B9CIyy3JByFtiKJr7eB3uuG4w+VVoOwjjllIPc+1c21hvnlUf1qt6pW8aqlSmNDucSZG /Dsnz/kbx1WVStDd7kC5XKOuV3voue4YR4lC1zhvAWvCIpIQWgpaIxbdWTP1kKyMmlJ5 tHd02Z24TwLEylgxuqKX3scMsXYmRTdk5c/MxbWXBwQMSLBohoFEfIwQ8O/qYgLOGO7e xE9A== 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=seNw2DhVJiey6ns91rPCgQkGe8jTaFx1SsPFTXvN4Pk=; b=W9KfLX5UcYiybrnZzs4rB9U6OaAXJzRkFTs/LwP0rlVhwZoTCBpH0AXRD6oAFXvikY JQ7as7ki6+7BDpy7tjHZ9QIZowYOfFv1fv1CePMUp273GIHqyQEep0wui5pdF2xdENvg e4G3MDvSo7AmEX7MHuvcoIMhk/HxiH56X5I2wsucQx8ZQgEnOeVVSCbVR/Ycq1Zb99cv bwf2csixpqMJsayuDWKM9umbyVEQDW+vkwQWFIRlzybwWRkG8G6GJtrzwjLtiIym+R4K 6X90RbgKK2Bu1kp+kblLNa6n3Mbn/fXnqmCiSf21oT26IrCRXuii1TMD7hhQlHzMo326 mvBA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=z60J3Anw; 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 71si13955713jaw.105.2021.09.20.18.49.22; Mon, 20 Sep 2021 18:49:33 -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=z60J3Anw; 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 S1348870AbhITRlx (ORCPT + 99 others); Mon, 20 Sep 2021 13:41:53 -0400 Received: from mail.kernel.org ([198.145.29.99]:42382 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1352365AbhITRjO (ORCPT ); Mon, 20 Sep 2021 13:39:14 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 1AB146137A; Mon, 20 Sep 2021 17:07:40 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1632157661; bh=eDf+Y2pKgCWX3tDOUyAt5Id4kBZZh9MhoiHT6Dkrezk=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=z60J3Anw9oy3E1+sVXzgB6oTtqj7bpSalc30eY4tqilgLxupfuVTiJ/vGIBQWW9aX J3cz8TRPvaWgqKJb9skqGH47uqz0I6FX43oTqOSukgjlx4FksVcUqAi9C7PPv2yS2r P3p0QvX/lQgOw6XiPvHVsbcyzZyhOrGJiSMPHRIs= 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.19 093/293] mmc: moxart: Fix issue with uninitialized dma_slave_config Date: Mon, 20 Sep 2021 18:40:55 +0200 Message-Id: <20210920163936.448279337@linuxfoundation.org> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20210920163933.258815435@linuxfoundation.org> References: <20210920163933.258815435@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 a0670e9cd012..5553a5643f40 100644 --- a/drivers/mmc/host/moxart-mmc.c +++ b/drivers/mmc/host/moxart-mmc.c @@ -631,6 +631,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