Received: by 2002:a05:6a11:4021:0:0:0:0 with SMTP id ky33csp91798pxb; Mon, 13 Sep 2021 13:51:06 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwjvmhpX+xlMTz0bj/JEUbV7zAdbtQmyGmxMYSk1hWqMdFt3doxl/Z/DV6LnneSOgQmReTd X-Received: by 2002:a05:6402:3454:: with SMTP id l20mr15379368edc.83.1631566266379; Mon, 13 Sep 2021 13:51:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1631566266; cv=none; d=google.com; s=arc-20160816; b=YbisE7QAqZ4PdT/thLsPkMm3To7lK71MFIUJNTCEHxKqsIXTCWaKY8FdfE/DwpDUA2 anso18uIy3ki1tNk47F2qYaAgFb3hQwOLVGicLjqO9Qq0KNOSjNLRZw6xO5JCsVq0O68 +HopI8Z4lDqEdfcacWktUYE3VUSS6c3DDjNeVbtz9so1wzCrjkBDzbjGJ8YpHVnxTHLP khygvWe0pI2lqY6vU/24XhVyzWZ54ksn30apPoPLBtqI0+yu+xsypDS8yU5NSOMAdQIl VJFvYHm7JApq97wQo9MASOpVF2x3XH8GM9JzkTdLrh5CaewarY84aKZT9nsQgranMzKo PfAg== 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=NFrKAeKHixM4144aQQIk2hylY6GIjBMCVnW3TX2cRh8=; b=BUR3Dh3/JgSZF3UM1WDm748Dyg4kE67Vor10U/iuJovmJeWzRI4RzlZPYo2ewX1llk 9nkL51A35Qk+BEACJEvgFjcW5mEbsivoLuz2fC+Nc7ba9G6ZwiovpL3Jfxb9Dy5gsWnD zFEJdRpdxvd0T5bMTPLu7SpdCmpRfRHf/WA1r0C1V54O0mSRh6Tnz+BZqkaMOXGzDEn9 H6iDg1qHp/CzRFYCKjxUnVk8GVI2uOM1k2elokEMciy67LvaaDaDp0qTxcGeBhIIuvVB b1nhN1vaJwEy2mgwa5WGvHbweISc3R6UasydmAe28OKq9NnPPoxLsBcEvnPsvwMbIL0j 5/+Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=yCGxXU2T; 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 cb3si8084571edb.528.2021.09.13.13.50.28; Mon, 13 Sep 2021 13:51:06 -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=yCGxXU2T; 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 S242665AbhIMNso (ORCPT + 99 others); Mon, 13 Sep 2021 09:48:44 -0400 Received: from mail.kernel.org ([198.145.29.99]:46738 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S241651AbhIMNoF (ORCPT ); Mon, 13 Sep 2021 09:44:05 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 05BE661462; Mon, 13 Sep 2021 13:30:56 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1631539857; bh=KIWxaxM3BXB5q97jGjBCovjV9AzPnaC1SVVwfVtNsIo=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=yCGxXU2T03m3rrxfCjN5AdR4tDz8N1f5suUhKR89rs08adlRXE6/CK7C7OIPizMSF M+wd+E29b06neUZvatP9w+yj+S2S+PKXNK0zN9tiewx67uvKhb5U8vT8JRHerB95ZO 9gTmG0HzH2rig9khTw+BAX5aNIaLxuN5XoxsyKso= 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 5.10 188/236] mmc: moxart: Fix issue with uninitialized dma_slave_config Date: Mon, 13 Sep 2021 15:14:53 +0200 Message-Id: <20210913131106.776841643@linuxfoundation.org> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20210913131100.316353015@linuxfoundation.org> References: <20210913131100.316353015@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 f25079ba3bca..2e4a7c6971dc 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