From ce45763b5804988836bf10333dc69ec02c93704d Mon Sep 17 00:00:00 2001 From: Jeremy Cline Date: Thu, 23 Jan 2020 04:03:42 -0500 Subject: Pick up an ALSA bug fix for rhbz 1772498 --- ...gy-fix-soc_tplg_fe_link_create-link-dobj-.patch | 60 ++++++++++++++++++++++ kernel.spec | 3 ++ 2 files changed, 63 insertions(+) create mode 100644 ASoC-topology-fix-soc_tplg_fe_link_create-link-dobj-.patch diff --git a/ASoC-topology-fix-soc_tplg_fe_link_create-link-dobj-.patch b/ASoC-topology-fix-soc_tplg_fe_link_create-link-dobj-.patch new file mode 100644 index 000000000..f86069ab9 --- /dev/null +++ b/ASoC-topology-fix-soc_tplg_fe_link_create-link-dobj-.patch @@ -0,0 +1,60 @@ +From 29bc8978342b2d94a65801904c44dc7b0ef88da2 Mon Sep 17 00:00:00 2001 +From: Jaroslav Kysela +Date: Wed, 22 Jan 2020 20:07:52 +0100 +Subject: [PATCH] ASoC: topology: fix soc_tplg_fe_link_create() - link->dobj + initialization order + +The code which checks the return value for snd_soc_add_dai_link() call +in soc_tplg_fe_link_create() moved the snd_soc_add_dai_link() call before +link->dobj members initialization. + +While it does not affect the latest kernels, the old soc-core.c code +in the stable kernels is affected. The snd_soc_add_dai_link() function uses +the link->dobj.type member to check, if the link structure is valid. + +Reorder the link->dobj initialization to make things work again. +It's harmless for the recent code (and the structure should be properly +initialized before other calls anyway). + +The problem is in stable linux-5.4.y since version 5.4.11 when the +upstream commit 76d270364932 was applied. + +Fixes: 76d270364932 ("ASoC: topology: Check return value for snd_soc_add_dai_link()") +Cc: Dragos Tarcatu +Cc: Pierre-Louis Bossart +Cc: Ranjani Sridharan +Cc: Mark Brown +Cc: +Signed-off-by: Jaroslav Kysela +--- + sound/soc/soc-topology.c | 7 ++++--- + 1 file changed, 4 insertions(+), 3 deletions(-) + +diff --git a/sound/soc/soc-topology.c b/sound/soc/soc-topology.c +index fd2d22ddc81b..1c143a00633f 100644 +--- a/sound/soc/soc-topology.c ++++ b/sound/soc/soc-topology.c +@@ -1891,6 +1891,10 @@ static int soc_tplg_fe_link_create(struct soc_tplg *tplg, + link->num_codecs = 1; + link->num_platforms = 1; + ++ link->dobj.index = tplg->index; ++ link->dobj.ops = tplg->ops; ++ link->dobj.type = SND_SOC_DOBJ_DAI_LINK; ++ + if (strlen(pcm->pcm_name)) { + link->name = kstrdup(pcm->pcm_name, GFP_KERNEL); + link->stream_name = kstrdup(pcm->pcm_name, GFP_KERNEL); +@@ -1927,9 +1931,6 @@ static int soc_tplg_fe_link_create(struct soc_tplg *tplg, + goto err; + } + +- link->dobj.index = tplg->index; +- link->dobj.ops = tplg->ops; +- link->dobj.type = SND_SOC_DOBJ_DAI_LINK; + list_add(&link->dobj.list, &tplg->comp->dobj_list); + + return 0; +-- +2.24.1 + diff --git a/kernel.spec b/kernel.spec index 77880f7e3..5cf4e1173 100644 --- a/kernel.spec +++ b/kernel.spec @@ -826,6 +826,9 @@ Patch600: alsa-5.5.patch # ALSA code from v5.6 (Intel ASoC Sound Open Firmware driver support) Patch601: alsa-5.6.patch +# https://bugzilla.redhat.com/show_bug.cgi?id=1772498#c101 +Patch602: ASoC-topology-fix-soc_tplg_fe_link_create-link-dobj-.patch + # END OF PATCH DEFINITIONS %endif -- cgit From 6ed7c3491e269e491e3d21f682bf7012750cd32e Mon Sep 17 00:00:00 2001 From: Jeremy Cline Date: Thu, 23 Jan 2020 04:12:26 -0500 Subject: Linux v5.4.14 --- kernel.spec | 10 +-- ...revent-memory-leak-in-i40e_setup_macvlans.patch | 80 ---------------------- sources | 2 +- 3 files changed, 6 insertions(+), 86 deletions(-) delete mode 100644 net-next-v2-9-9-i40e-prevent-memory-leak-in-i40e_setup_macvlans.patch diff --git a/kernel.spec b/kernel.spec index 5cf4e1173..63ba56baf 100644 --- a/kernel.spec +++ b/kernel.spec @@ -77,7 +77,7 @@ Summary: The Linux kernel # For non-released -rc kernels, this will be appended after the rcX and # gitX tags, so a 3 here would become part of release "0.rcX.gitX.3" # -%global baserelease 201 +%global baserelease 200 %global fedora_build %{baserelease} # base_sublevel is the kernel version we're starting with and patching @@ -89,7 +89,7 @@ Summary: The Linux kernel %if 0%{?released_kernel} # Do we have a -stable update to apply? -%define stable_update 13 +%define stable_update 14 # Set rpm version accordingly %if 0%{?stable_update} %define stablerev %{stable_update} @@ -801,9 +801,6 @@ Patch503: KEYS-Make-use-of-platform-keyring-for-module-signature.patch # https://lkml.org/lkml/2019/8/29/1772 Patch504: ARM-fix-__get_user_check-in-case-uaccess_-calls-are-not-inlined.patch -# CVE-2019-19043 rhbz 1774972 1774973 -Patch512: net-next-v2-9-9-i40e-prevent-memory-leak-in-i40e_setup_macvlans.patch - # CVE-2019-19046 rhbz 1774988 1774989 Patch514: ipmi-Fix-memory-leak-in-__ipmi_bmc_register.patch @@ -2526,6 +2523,9 @@ fi # # %changelog +* Thu Jan 23 2020 Jeremy Cline - 5.4.14-200 +- Linux v5.4.14 + * Tue Jan 21 2020 Jeremy Cline - 5.4.13-201 - Re-add the Intel ASoC Sound Open Firmware driver support diff --git a/net-next-v2-9-9-i40e-prevent-memory-leak-in-i40e_setup_macvlans.patch b/net-next-v2-9-9-i40e-prevent-memory-leak-in-i40e_setup_macvlans.patch deleted file mode 100644 index e58103c7a..000000000 --- a/net-next-v2-9-9-i40e-prevent-memory-leak-in-i40e_setup_macvlans.patch +++ /dev/null @@ -1,80 +0,0 @@ -From patchwork Fri Oct 25 20:42:42 2019 -Content-Type: text/plain; charset="utf-8" -MIME-Version: 1.0 -Content-Transfer-Encoding: 7bit -X-Patchwork-Submitter: Jeff Kirsher -X-Patchwork-Id: 1184451 -X-Patchwork-Delegate: davem@davemloft.net -Return-Path: -X-Original-To: patchwork-incoming-netdev@ozlabs.org -Delivered-To: patchwork-incoming-netdev@ozlabs.org -Authentication-Results: ozlabs.org; spf=none (no SPF record) - smtp.mailfrom=vger.kernel.org (client-ip=209.132.180.67; - helo=vger.kernel.org; - envelope-from=netdev-owner@vger.kernel.org; - receiver=) -Authentication-Results: ozlabs.org; - dmarc=fail (p=none dis=none) header.from=intel.com -Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) - by ozlabs.org (Postfix) with ESMTP id 470GJz096Tz9sPf - for ; - Sat, 26 Oct 2019 07:42:59 +1100 (AEDT) -Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand - id S1728655AbfJYUmz (ORCPT - ); - Fri, 25 Oct 2019 16:42:55 -0400 -Received: from mga11.intel.com ([192.55.52.93]:22523 "EHLO mga11.intel.com" - rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP - id S1728604AbfJYUmq (ORCPT ); - Fri, 25 Oct 2019 16:42:46 -0400 -X-Amp-Result: SKIPPED(no attachment in message) -X-Amp-File-Uploaded: False -Received: from orsmga006.jf.intel.com ([10.7.209.51]) - by fmsmga102.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; - 25 Oct 2019 13:42:46 -0700 -X-ExtLoop1: 1 -X-IronPort-AV: E=Sophos;i="5.68,229,1569308400"; d="scan'208";a="202713981" -Received: from jtkirshe-desk1.jf.intel.com ([134.134.177.96]) - by orsmga006.jf.intel.com with ESMTP; 25 Oct 2019 13:42:44 -0700 -From: Jeff Kirsher -To: davem@davemloft.net -Cc: Navid Emamdoost , - netdev@vger.kernel.org, nhorman@redhat.com, sassmann@redhat.com, - Andrew Bowers , - Jeff Kirsher -Subject: [net-next v2 9/9] i40e: prevent memory leak in i40e_setup_macvlans -Date: Fri, 25 Oct 2019 13:42:42 -0700 -Message-Id: <20191025204242.10535-10-jeffrey.t.kirsher@intel.com> -X-Mailer: git-send-email 2.21.0 -In-Reply-To: <20191025204242.10535-1-jeffrey.t.kirsher@intel.com> -References: <20191025204242.10535-1-jeffrey.t.kirsher@intel.com> -MIME-Version: 1.0 -Sender: netdev-owner@vger.kernel.org -Precedence: bulk -List-ID: -X-Mailing-List: netdev@vger.kernel.org - -From: Navid Emamdoost - -In i40e_setup_macvlans if i40e_setup_channel fails the allocated memory -for ch should be released. - -Signed-off-by: Navid Emamdoost -Tested-by: Andrew Bowers -Signed-off-by: Jeff Kirsher ---- - drivers/net/ethernet/intel/i40e/i40e_main.c | 1 + - 1 file changed, 1 insertion(+) - -diff --git a/drivers/net/ethernet/intel/i40e/i40e_main.c b/drivers/net/ethernet/intel/i40e/i40e_main.c -index 2e4df0bd8d37..141575ada588 100644 ---- a/drivers/net/ethernet/intel/i40e/i40e_main.c -+++ b/drivers/net/ethernet/intel/i40e/i40e_main.c -@@ -7187,6 +7187,7 @@ static int i40e_setup_macvlans(struct i40e_vsi *vsi, u16 macvlan_cnt, u16 qcnt, - ch->num_queue_pairs = qcnt; - if (!i40e_setup_channel(pf, vsi, ch)) { - ret = -EINVAL; -+ kfree(ch); - goto err_free; - } - ch->parent_vsi = vsi; diff --git a/sources b/sources index d7664772e..fcacb6457 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ SHA512 (linux-5.4.tar.xz) = 9f60f77e8ab972b9438ac648bed17551c8491d6585a5e85f694b2eaa4c623fbc61eb18419b2656b6795eac5deec0edaa04547fc6723fbda52256bd7f3486898f -SHA512 (patch-5.4.13.xz) = e500486d372b242fb8fbffc780fb0a842012d699bb494c29a392befe0fd06e4858d89d995b71627e65eb93bf53af9f7bf37e8cbaa3d9356fc00356d81fbc893c +SHA512 (patch-5.4.14.xz) = 4725f940480f49f3f8d19d315d3d0aeeeda6ea180985d7b87678f949164d69bf23ed68ad74367c9a055ffbcb4d7f298010d33d78305a764ba4d4210e93a4a67d -- cgit