diff options
author | Thorsten Leemhuis <fedora@leemhuis.info> | 2020-01-24 06:39:38 +0100 |
---|---|---|
committer | Thorsten Leemhuis <fedora@leemhuis.info> | 2020-01-24 06:40:08 +0100 |
commit | 2d2378469c95288a1c825b4b05afa4280f0803ec (patch) | |
tree | 77d843b408adacc7b9c17066537b34247d87a67f | |
parent | e8b8371d820a43d6b71b2bc7a89c573f41a883dc (diff) | |
parent | 6ed7c3491e269e491e3d21f682bf7012750cd32e (diff) | |
download | kernel-2d2378469c95288a1c825b4b05afa4280f0803ec.tar.gz kernel-2d2378469c95288a1c825b4b05afa4280f0803ec.tar.xz kernel-2d2378469c95288a1c825b4b05afa4280f0803ec.zip |
merge origin
-rw-r--r-- | ASoC-topology-fix-soc_tplg_fe_link_create-link-dobj-.patch | 60 | ||||
-rw-r--r-- | kernel.spec | 11 | ||||
-rw-r--r-- | net-next-v2-9-9-i40e-prevent-memory-leak-in-i40e_setup_macvlans.patch | 80 |
3 files changed, 67 insertions, 84 deletions
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 <perex@perex.cz> +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 <dragos_tarcatu@mentor.com> +Cc: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> +Cc: Ranjani Sridharan <ranjani.sridharan@linux.intel.com> +Cc: Mark Brown <broonie@kernel.org> +Cc: <stable@vger.kernel.org> +Signed-off-by: Jaroslav Kysela <perex@perex.cz> +--- + 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 8918fe7ff..70e9ba3aa 100644 --- a/kernel.spec +++ b/kernel.spec @@ -79,7 +79,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 250 +%global baserelease 200 %global fedora_build %{baserelease} # base_sublevel is the kernel version we're starting with and patching @@ -822,9 +822,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 @@ -847,6 +844,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 @@ -2547,6 +2547,9 @@ fi # # %changelog +* Thu Jan 23 2020 Jeremy Cline <jcline@redhat.com> - 5.4.14-200 +- Linux v5.4.14 + * Tue Jan 21 2020 Jeremy Cline <jcline@redhat.com> - 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 <jeffrey.t.kirsher@intel.com> -X-Patchwork-Id: 1184451 -X-Patchwork-Delegate: davem@davemloft.net -Return-Path: <netdev-owner@vger.kernel.org> -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=<UNKNOWN>) -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 <patchwork-incoming-netdev@ozlabs.org>; - Sat, 26 Oct 2019 07:42:59 +1100 (AEDT) -Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand - id S1728655AbfJYUmz (ORCPT - <rfc822;patchwork-incoming-netdev@ozlabs.org>); - 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 <rfc822;netdev@vger.kernel.org>); - 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 <jeffrey.t.kirsher@intel.com> -To: davem@davemloft.net -Cc: Navid Emamdoost <navid.emamdoost@gmail.com>, - netdev@vger.kernel.org, nhorman@redhat.com, sassmann@redhat.com, - Andrew Bowers <andrewx.bowers@intel.com>, - Jeff Kirsher <jeffrey.t.kirsher@intel.com> -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: <netdev.vger.kernel.org> -X-Mailing-List: netdev@vger.kernel.org - -From: Navid Emamdoost <navid.emamdoost@gmail.com> - -In i40e_setup_macvlans if i40e_setup_channel fails the allocated memory -for ch should be released. - -Signed-off-by: Navid Emamdoost <navid.emamdoost@gmail.com> -Tested-by: Andrew Bowers <andrewx.bowers@intel.com> -Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com> ---- - 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; |