Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp2275696pxb; Thu, 11 Feb 2021 08:27:16 -0800 (PST) X-Google-Smtp-Source: ABdhPJzmUJ3y/N/r8VGVQFKLgI8o0VKisScJddX6fnCQFsLU5fU49PMkPTg2N2y4y4Cgf5JY4IlF X-Received: by 2002:a17:906:1bf2:: with SMTP id t18mr9556559ejg.166.1613060836034; Thu, 11 Feb 2021 08:27:16 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1613060836; cv=none; d=google.com; s=arc-20160816; b=iTvzgaM9KO/xGDambOhe1Lzl2g69Pd3td5XYjNY8Uhqj9B4KI3Bds0hgiCh3lSOuW5 01RWgMfuB5RoNa4K1kW8/dRtsPJTRQP1wEEKwV8NuuZLvukqwfpv8hacc4yz9LcDfMRr +e1j9NABTy2m+7RLrUL6lwHV4++PUkZ5k57bCGmB7DemyG/hoedU8PgMUypq4YCDgXnv rELzC6Uyc4R2i9xjy6gf6IuOuTHzU7rldWmELnvKCfQW52Ny51tLcnZ3SHMyRBMUS0An 6QHK9AesUf0a5o8SG25AQCGfM4NwYFholCvixKmmDMErfApDkaLjCWgSQlVVlTQARldt fG7Q== 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=HU2CYF6zUPGvpBL2QvPTkG5bG21MSpEYUKCvALSSXZo=; b=l4NOh6FZoF0C6mVTOmySR4I06aAfBuP+zbWiQ2HPdjVJKVfXSSgTOygIzwTxtSqnuO +W16CX9uLuHyjyayFKl4+yplcB5xXzjheBcozz7LRepYtmFlkeaI2io9cUuq9ENLrwxd JpnlxSB2kyTVkGjgS8L8ktcOhSY3oDTPaQRIMDanz9qwK4d9D2kNWsb7hzGiOYQHsUOl T7aDWMsX9+KT2ITTpa8TYkZf3nFz/ghW3cCAvFL3+znWN5FYOGRwTVMIcBJGkbInc+qK teMlFikh4lknuyzpozheNfh3qynjXH+hQK91E9x8endPsHORDNz3FHE0VUpuHJh7H+Vm i+0Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=ta7N5Xq5; 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 pw11si4138733ejb.270.2021.02.11.08.26.50; Thu, 11 Feb 2021 08:27:16 -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=ta7N5Xq5; 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 S232001AbhBKQZG (ORCPT + 99 others); Thu, 11 Feb 2021 11:25:06 -0500 Received: from mail.kernel.org ([198.145.29.99]:53514 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230374AbhBKPYz (ORCPT ); Thu, 11 Feb 2021 10:24:55 -0500 Received: by mail.kernel.org (Postfix) with ESMTPSA id 0B2D464ED3; Thu, 11 Feb 2021 15:03:52 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1613055833; bh=2i91wcR6FSmxDGIbAu0My5Iqm6oIMPy3GILWtDUAKM0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=ta7N5Xq5TLEJ75z1Kz6iFJwHWmlct/8HM+EKBIe5Gr95ieLWzcSDkZghqkPDE5Idd AXzL3YvtAL6Eo5DjSlaRUSd/9yqj4h+u0ztyLbgu5Cgiv5lpKItU4rFH/4ubT4hLoh IgaZnwlazaAGLN294uYTGmH/O4Sus4ZowTnuXmJA= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Ricardo Ribalda , Cezary Rojewski , Andy Shevchenko , Mark Brown , Sasha Levin Subject: [PATCH 5.10 24/54] ASoC: Intel: Skylake: Zero snd_ctl_elem_value Date: Thu, 11 Feb 2021 16:02:08 +0100 Message-Id: <20210211150153.934880419@linuxfoundation.org> X-Mailer: git-send-email 2.30.1 In-Reply-To: <20210211150152.885701259@linuxfoundation.org> References: <20210211150152.885701259@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: Ricardo Ribalda [ Upstream commit 1d8fe0648e118fd495a2cb393a34eb8d428e7808 ] Clear struct snd_ctl_elem_value before calling ->put() to avoid any data leak. Signed-off-by: Ricardo Ribalda Reviewed-by: Cezary Rojewski Reviewed-by: Andy Shevchenko Link: https://lore.kernel.org/r/20210121171644.131059-2-ribalda@chromium.org Signed-off-by: Mark Brown Signed-off-by: Sasha Levin --- sound/soc/intel/skylake/skl-topology.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sound/soc/intel/skylake/skl-topology.c b/sound/soc/intel/skylake/skl-topology.c index d699e61eca3d0..0955cbb4e9187 100644 --- a/sound/soc/intel/skylake/skl-topology.c +++ b/sound/soc/intel/skylake/skl-topology.c @@ -3632,7 +3632,7 @@ static void skl_tplg_complete(struct snd_soc_component *component) sprintf(chan_text, "c%d", mach->mach_params.dmic_num); for (i = 0; i < se->items; i++) { - struct snd_ctl_elem_value val; + struct snd_ctl_elem_value val = {}; if (strstr(texts[i], chan_text)) { val.value.enumerated.item[0] = i; -- 2.27.0