Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp3289507pxk; Mon, 21 Sep 2020 09:48:02 -0700 (PDT) X-Google-Smtp-Source: ABdhPJy0BQFgtR7zpEg4kDB5LXYq1h2lk8TqKflFtWonJIKLCD9gANq023VOXzYU9i2yKBaWXCWr X-Received: by 2002:a50:f081:: with SMTP id v1mr560015edl.161.1600706882723; Mon, 21 Sep 2020 09:48:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1600706882; cv=none; d=google.com; s=arc-20160816; b=zOUR5Zl1pd/xKcoxAlvkk655gH8QE5iVYJNRBNt1Gg3tr2cqOBFjwnkXHwezxdyjGz NPt+Wt68XH4ae+2ONAzQ4i593RMiIyaLLFSNr3cL/Mbn1TAlrRgOATOyNWDYqeRFChL/ mfPm+v71HwUWmX3mLKT+t0L+5TQHHVjhzvfbEzAG7+ebGxBtWBiiyVLI28Vv2IB15CsX lV0wWi+2CzFR3HXN6h/tNw296o0BB3nnVXCsj0EFDgOBBmNzELGCM6rRsR/0rFjeuSmR fzx5PGB54xIo0SBfgl93VQiXEm+U0YxpVwp8N6SqRMjmvcn5MUeFw/sG3/w9jT8u03lq ixEw== 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=qmn8ofH7uGmKuQwXuMMM7oczb3qHxYlMX3OawE0zNOU=; b=h0MJ/CSTTfxc1HsPQqlhnAHMt6bojkYBUznOMgoEf9dNrNi689KIRd7v6X4nVs1iF/ tndHrQpT3ldBwHpR/ue/mVNUPIR6BNim6nRWNuNzuL6I6n0VV3Dz/GADEdmCjfpoC7N3 EqlDymzz7nky/QFwFg332ochHGFrIwhUbqw9dSir7BSCqZq9Twz4yd6//jFGtqxFAQp0 oT5/T42RQYu+Gu13T9nWc+cMjwx/TtHhEIlTr1z/zBEA+SBG8oJHXcOKTRkQXuBn+nr1 1tEnO+zYlFk63TENJ8GLgc6LSDDZct0HHMiWIgfyj5AmdN37h5ngsSF4VowlTqzrBe0q PTUg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=HHNRx92P; 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=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id rn6si7521434ejb.423.2020.09.21.09.47.39; Mon, 21 Sep 2020 09:48:02 -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=@kernel.org header.s=default header.b=HHNRx92P; 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=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729273AbgIUQoh (ORCPT + 99 others); Mon, 21 Sep 2020 12:44:37 -0400 Received: from mail.kernel.org ([198.145.29.99]:49248 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729670AbgIUQoJ (ORCPT ); Mon, 21 Sep 2020 12:44:09 -0400 Received: from localhost (83-86-74-64.cable.dynamic.v4.ziggo.nl [83.86.74.64]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 18BDF23998; Mon, 21 Sep 2020 16:44:07 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1600706648; bh=4v8q9J/9fwWug1dfX+6rl1pBaG1KGfGEq1QFjK0EsXA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=HHNRx92Pj+wwo2+ajxcKL5s83ihAEyoImXqpQzgHfItUXcfRuVA74OeyerwiXJMI0 nTmB2ZVp7BCwuacD6TPE9onitYvtHRemTPtypO3M7aZ2dsk/eKeIso2KWGxWp9cZf8 1GNBGzx36jgJ++VJJRa54ivMHYlnOYDZ2ZTKSWvE= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Mateusz Gorski , Kai Vehmanen , Mark Brown , Sasha Levin Subject: [PATCH 5.8 038/118] ASoC: Intel: skl_hda_dsp_generic: Fix NULLptr dereference in autosuspend delay Date: Mon, 21 Sep 2020 18:27:30 +0200 Message-Id: <20200921162038.067119767@linuxfoundation.org> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20200921162036.324813383@linuxfoundation.org> References: <20200921162036.324813383@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: Mateusz Gorski [ Upstream commit 5610921a4435ef45c33702073e64f835f3dca7f1 ] Different modules for HDMI codec are used depending on the "hda_codec_use_common_hdmi" option being enabled or not. Driver private context for both of them is different. This leads to null-pointer dereference error when driver tries to set autosuspend delay for HDMI codec while the option is off (hdac_hdmi module is used for HDMI). Change the string in conditional statement to "ehdaudio0D0" to ensure that only the HDAudio codec is handled by this function. Fixes: 5bf73b1b1dec ("ASoC: intel/skl/hda - fix oops on systems without i915 audio codec") Signed-off-by: Mateusz Gorski Reviewed-by: Kai Vehmanen Link: https://lore.kernel.org/r/20200722173524.30161-1-mateusz.gorski@linux.intel.com Signed-off-by: Mark Brown Signed-off-by: Sasha Levin --- sound/soc/intel/boards/skl_hda_dsp_generic.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sound/soc/intel/boards/skl_hda_dsp_generic.c b/sound/soc/intel/boards/skl_hda_dsp_generic.c index ca4900036ead9..bc50eda297ab7 100644 --- a/sound/soc/intel/boards/skl_hda_dsp_generic.c +++ b/sound/soc/intel/boards/skl_hda_dsp_generic.c @@ -181,7 +181,7 @@ static void skl_set_hda_codec_autosuspend_delay(struct snd_soc_card *card) struct snd_soc_dai *dai; for_each_card_rtds(card, rtd) { - if (!strstr(rtd->dai_link->codecs->name, "ehdaudio")) + if (!strstr(rtd->dai_link->codecs->name, "ehdaudio0D0")) continue; dai = asoc_rtd_to_codec(rtd, 0); hda_pvt = snd_soc_component_get_drvdata(dai->component); -- 2.25.1