Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp409729pxb; Thu, 21 Jan 2021 09:54:33 -0800 (PST) X-Google-Smtp-Source: ABdhPJyhKdyV+w7L1L17h0RWPu1imwVNj19OmiXOCcM08IonfTYtFTfH969ai2ATcY9cLcQ1V2F6 X-Received: by 2002:a05:6402:35c2:: with SMTP id z2mr271855edc.34.1611251673263; Thu, 21 Jan 2021 09:54:33 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1611251673; cv=none; d=google.com; s=arc-20160816; b=pcHu1wlMLrjUhM8F+HWEvU6zE/q+MyduXWLe17PmZo5B5CnmCs37VKu1+gqrUPEFb0 xSFyHnDR5n3rEzakto8iBQL6bXvZSRSA4m7FmiCbaWXrrNhEt2NnkNi6BxJxYyU1ujjm EVsqX7Qju/TOavmHPJ4eztLhuoM10SVowxSLYqj6fqwKyvR9tkhtmNs4jI9lXCgwTGqv zTDs3zEc13qivHcZ4GFpXgzk79jquejLzjFqI9dSC30sNkXobZuxhZDilCJbK5LEoCz4 sCUUYhLk28+4YQiYHKcB89OF5H+OiZPsgzqIB9rLYAMpi750PZudpKyeYHTlzpixnbsu DO1g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:organization:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :ironport-sdr:ironport-sdr; bh=0Q99ucACxFOgRYmSOL1o+5iV9MzA6GiqAoR5lswZDUE=; b=CFSDFJ3Nd8HDAvqs3h3JUATEHgTNkXZZYAZtKKp3Fx1nwNXjVZF6EhvLovYd1rhBZw uSI4V5ONQuAT5Fya43qt4vcUEAN8RMMq5TjingMyg53bzTw6zc9X2fz38zxjUrwoFhYq ZhcwR429wdf9dF9+8zpky6DqpArxft11Wv1CgEcRPTboClBfnhyZUkgkDIdsa72dOkh9 B7GB/aHQ/LxY8oVk05MFvX4LHOWrsNB+tHV+89kl8Tn3PrEKQFUqy8UXkKFgvKk/ep1W CICl+pyXtfqCKGyZw+xQerCUiTLD5I6ZeqxaJs6tpaZIR4CVHoA5QREPCLUUxbSWWq7m thLQ== ARC-Authentication-Results: i=1; mx.google.com; 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=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id h6si2045499ejy.98.2021.01.21.09.54.08; Thu, 21 Jan 2021 09:54:33 -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; 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=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2389207AbhAURu7 (ORCPT + 99 others); Thu, 21 Jan 2021 12:50:59 -0500 Received: from mga06.intel.com ([134.134.136.31]:3683 "EHLO mga06.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2389148AbhAURsF (ORCPT ); Thu, 21 Jan 2021 12:48:05 -0500 IronPort-SDR: pnHjQ20/ASKcM/oNKPao6H511oJQfF9k/IUh5lcbopSghaffaZSDFtYGFw6egMLuiFTRvnDLzB 6mjvKoELwWyA== X-IronPort-AV: E=McAfee;i="6000,8403,9871"; a="240849797" X-IronPort-AV: E=Sophos;i="5.79,364,1602572400"; d="scan'208";a="240849797" Received: from orsmga001.jf.intel.com ([10.7.209.18]) by orsmga104.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 21 Jan 2021 09:46:20 -0800 IronPort-SDR: S8I3SKCOdNxCtAanMLbnazamcZPP2+1r1NdLYAt0c3poCPSyo2ymCYY6ZXQ5dnZBE7VOZBNO5f 5juMlkBFMyFg== X-IronPort-AV: E=Sophos;i="5.79,364,1602572400"; d="scan'208";a="427447489" Received: from smile.fi.intel.com (HELO smile) ([10.237.68.40]) by orsmga001-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 21 Jan 2021 09:46:16 -0800 Received: from andy by smile with local (Exim 4.94) (envelope-from ) id 1l2e3D-007oOc-4n; Thu, 21 Jan 2021 19:47:19 +0200 Date: Thu, 21 Jan 2021 19:47:19 +0200 From: Andy Shevchenko To: Ricardo Ribalda Cc: Cezary Rojewski , Pierre-Louis Bossart , Liam Girdwood , Jie Yang , Mark Brown , Jaroslav Kysela , Takashi Iwai , Mateusz Gorski , alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org, Lukasz Majczak Subject: Re: [PATCH v2 2/2] ASoC: Intel: Skylake: Zero snd_ctl_elem_value Message-ID: References: <20210121171644.131059-1-ribalda@chromium.org> <20210121171644.131059-2-ribalda@chromium.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210121171644.131059-2-ribalda@chromium.org> Organization: Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Jan 21, 2021 at 06:16:44PM +0100, Ricardo Ribalda wrote: > Clear struct snd_ctl_elem_value before calling ->put() to avoid any data > leak. Reviewed-by: Andy Shevchenko > Signed-off-by: Ricardo Ribalda > --- > 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 1ef30ca45410..b824086203b9 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.30.0.296.g2bfb1c46d8-goog > -- With Best Regards, Andy Shevchenko