Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp9402260pxu; Mon, 28 Dec 2020 15:18:51 -0800 (PST) X-Google-Smtp-Source: ABdhPJwR8KHdUA29U4sYtlD5sAtzJ64/f2I6htPWRCiOGwh/bccHXb81sfF2mvtiCxLtyiGhlfiA X-Received: by 2002:a17:906:56ca:: with SMTP id an10mr43509851ejc.498.1609197531696; Mon, 28 Dec 2020 15:18:51 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1609197531; cv=none; d=google.com; s=arc-20160816; b=Zv3p17AU5QU8Z7H19eo+l+kxRS2vi4HG/B/2pajxB/D1MH298VYTxz1RaxwJmeRmrN iENcrdn7wtRn2vgvPzSKZJjwLQwEHmsK7lCoNSSkfeZdqPDzJQlrJdtLWfmP457nmxey c33QH6e1l9sgvzS2eFbb4kIrMZ3sPn5WwXMYV2A5EClzfnYbMpIq7k4OS48tGv5LOHqb pMJF20TlgBzyP3z4x0tOiN17jWh3E67udMUn2O88XlHp0hWzATKR/AEb7vrD4i3QQipm YYWbpcBVoXLRD4zhcxfQw34zlYXuf9crslC+V9Kst4oEUvmOQG7MhRdQX3CV+YrD01O6 7xIA== 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=QvJPbkqYgr6W1ICcrtOZq8sNF3P/bOe3oejdwClTLdI=; b=xbU+YD3N8fXx3KeIvzT4fSoD1sceechuY1MJmRVxX8q398SMAuym89++hm1P11YhZE bMtaHMGnGZbm5bM7UqLMiE5oi9NoCoqIj2hR4MOvJUSRg3ch3Ar1+WnRLPVW670KX2Gh NUfemPKg4NGuR2xlMMWgcYKIEV/fBcKW4Pv0g1X+PdP7qfJnSxFqGb8ycLVczP4G7r7+ 6vj0qy+iUNmlF2hUQj26rDpcUbnXe3JBqNelj3jUYO/RTHPNYQNwsIqGCIxPLpiRBnSX 3POpixKDSB12giBjlm6QW+NDTLmR1BPUACRsf2Y+XwRUCEk1taYfyP2zORfo/eOBJZYE /vAg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=xMyDf2l8; 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 c26si20427571edv.182.2020.12.28.15.18.29; Mon, 28 Dec 2020 15:18:51 -0800 (PST) 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=xMyDf2l8; 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 S2441400AbgL1ORN (ORCPT + 99 others); Mon, 28 Dec 2020 09:17:13 -0500 Received: from mail.kernel.org ([198.145.29.99]:50990 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2440767AbgL1OPx (ORCPT ); Mon, 28 Dec 2020 09:15:53 -0500 Received: by mail.kernel.org (Postfix) with ESMTPSA id C4FF6207A9; Mon, 28 Dec 2020 14:15:12 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1609164913; bh=m0scGpZXMGqPZfPUgamM7a80b/2g72UhwMb31yJLLkg=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=xMyDf2l8pgDymnU304JH3LFAwn6Tx3OuICzsZEosHkvYbZjeCi0gVmEM921/zu+P7 QJCp9pnSd7HotXnD+nJSP6Cw2hQLIoGnyBaWNT8yJIYkS4tPPNeLBFtsaJCpFSqM1m BwSh5daviQx8rvUcmPmIUwD+qSKKGVdeZi+V+dxI= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Arnd Bergmann , Tzung-Bi Shih , Mark Brown , Sasha Levin Subject: [PATCH 5.10 312/717] ASoC: cros_ec_codec: fix uninitialized memory read Date: Mon, 28 Dec 2020 13:45:10 +0100 Message-Id: <20201228125035.976670961@linuxfoundation.org> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20201228125020.963311703@linuxfoundation.org> References: <20201228125020.963311703@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: Arnd Bergmann [ Upstream commit 7061b8a52296e044eed47b605d136a48da1a7761 ] gcc points out a memory area that is copied to a device but not initialized: sound/soc/codecs/cros_ec_codec.c: In function 'i2s_rx_event': arch/x86/include/asm/string_32.h:83:20: error: '*((void *)&p+4)' may be used uninitialized in this function [-Werror=maybe-uninitialized] 83 | *((int *)to + 1) = *((int *)from + 1); Initialize all the unused fields to zero. Fixes: 727f1c71c780 ("ASoC: cros_ec_codec: refactor I2S RX") Signed-off-by: Arnd Bergmann Acked-by: Tzung-Bi Shih Link: https://lore.kernel.org/r/20201203225458.1477830-1-arnd@kernel.org Signed-off-by: Mark Brown Signed-off-by: Sasha Levin --- sound/soc/codecs/cros_ec_codec.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sound/soc/codecs/cros_ec_codec.c b/sound/soc/codecs/cros_ec_codec.c index 28f039adfa138..5c3b7e5e55d23 100644 --- a/sound/soc/codecs/cros_ec_codec.c +++ b/sound/soc/codecs/cros_ec_codec.c @@ -332,7 +332,7 @@ static int i2s_rx_event(struct snd_soc_dapm_widget *w, snd_soc_dapm_to_component(w->dapm); struct cros_ec_codec_priv *priv = snd_soc_component_get_drvdata(component); - struct ec_param_ec_codec_i2s_rx p; + struct ec_param_ec_codec_i2s_rx p = {}; switch (event) { case SND_SOC_DAPM_PRE_PMU: -- 2.27.0