From patchwork Mon Dec 28 12:45:10 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg KH X-Patchwork-Id: 352690 Delivered-To: patch@linaro.org Received: by 2002:a02:85a7:0:0:0:0:0 with SMTP id d36csp9805863jai; Mon, 28 Dec 2020 06:57:05 -0800 (PST) X-Google-Smtp-Source: ABdhPJz0W9GIpk9mHKL6lsSQbSJZ0Pd09Gnbx4fUidPxm7hTh2GaT67S9cCPk9otlZqW45zW5Wth X-Received: by 2002:a17:906:1ed6:: with SMTP id m22mr43535106ejj.231.1609167425200; Mon, 28 Dec 2020 06:57:05 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1609167425; cv=none; d=google.com; s=arc-20160816; b=WELJDMJEUNT3OhrECAewlcAoxAFaC+3GbHxmy8GZ24rLhdnU9nRx0UPklUSt45qYtl xBnmJ/a4bA9MXb/F2a0sJqhnv25/g1OCIh8ZekIc64ZohQWL9q9e/OhYHGkzF9+ei0uy H9HIoUy4lAhM4oM+6I7Sm5O4gZ8eb1rQHd93HDaz32NIuPR0Tg62nQ9+EZTnLUJvefhS Gj+l0yTcEzWeZ170HuLvDiP5dc1lMtSFHzmFFGXlfuoes5Z/Twz8eFoLz+51Bb0hayQ7 nEkRwaBr9r97svmVhI5Uv9dChRQ5TjOzqDJGOxsWzEZFtWFclnWsXJDzlNLt4Sdktf3B gNfw== 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=GuZDVVKxOFS4G6OX7XdlnHzb4+TkL49ZdSItXd1ssKONgNMrTtBzzPbk9CRIIiIyRr ICgW2pllATGFtWnAvlubjNe50W+d/ASQsMMBpi8cTkGvAHaVTlvqYK/EWhPErOZzA9zo YRMCpaHFFn/N/U8ahI7holoQ07ZAlE0WLkBJ1D4BEm4ZwRJxSlZWkHzYoKuVi2qeY/JI acM057ekfxNeWSx6kvLYFoZo6QX9uQLjCc6Cn73d6EJN05zBxiDYARCsSEA8LI0PoWyu q9PwUhG3HchjuH4w2jkFAGZu4PxhxfY2xBbkb3w2YmtUoKPX5mXp9qYogz3qJ41g359t uiKA== 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 stable-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=stable-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 z5si19937582ejj.425.2020.12.28.06.57.05; Mon, 28 Dec 2020 06:57:05 -0800 (PST) Received-SPF: pass (google.com: domain of stable-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 stable-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=stable-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 S2441343AbgL1ORC (ORCPT + 14 others); Mon, 28 Dec 2020 09:17:02 -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 Precedence: bulk List-ID: X-Mailing-List: stable@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(-) -- 2.27.0 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: