mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Kamal Mostafa <kamal@canonical.com>
To: linux-kernel@vger.kernel.org
Cc: stable@vger.kernel.org, kernel-team@lists.ubuntu.com,
	Patrick Lai <plai@codeaurora.org>,
	Mark Brown <broonie@linaro.org>,
	Ben Hutchings <ben@decadent.org.uk>
Subject: Re: [PATCH 3.8 57/86] ASoC: pcm: free path list before exiting from error conditions
Date: Thu, 03 Apr 2014 08:57:24 -0700	[thread overview]
Message-ID: <1396540644.20145.38.camel@fourier> (raw)
In-Reply-To: <1396368519-12728-58-git-send-email-kamal@canonical.com>

On Tue, 2014-04-01 at 09:08 -0700, Kamal Mostafa wrote:
> 3.8.13.21 -stable review patch.  If anyone has any objections, please let me know.
> 
> ------------------
> 
> From: Patrick Lai <plai@codeaurora.org>
> 
> commit e4ad1accb28d0ed8cea6f12395d58686ad344ca7 upstream.


I am dropping this patch from 3.8-stable, per Ben Hutchings' analysis in
stable@ thread "Re: [PATCH 3.13 110/149] ASoC: pcm: free path list
before exiting from error conditions".

Thanks, Ben!

 -Kamal


> dpcm_path_get() allocates dynamic memory to hold path list.
> Corresponding dpcm_path_put() must be called to free the memory.
> dpcm_path_put() is not called under several error conditions.
> This leads to memory leak.
> 
> Signed-off-by: Patrick Lai <plai@codeaurora.org>
> Signed-off-by: Mark Brown <broonie@linaro.org>
> Signed-off-by: Kamal Mostafa <kamal@canonical.com>
> ---
>  sound/soc/soc-pcm.c | 3 +++
>  1 file changed, 3 insertions(+)
> 
> diff --git a/sound/soc/soc-pcm.c b/sound/soc/soc-pcm.c
> index cf191e6..2d0dbd2 100644
> --- a/sound/soc/soc-pcm.c
> +++ b/sound/soc/soc-pcm.c
> @@ -1866,6 +1866,7 @@ int soc_dpcm_runtime_update(struct snd_soc_dapm_widget *widget)
>  
>  		paths = dpcm_path_get(fe, SNDRV_PCM_STREAM_PLAYBACK, &list);
>  		if (paths < 0) {
> +			dpcm_path_put(&list);
>  			dev_warn(fe->dev, "ASoC: %s no valid %s path\n",
>  					fe->dai_link->name,  "playback");
>  			mutex_unlock(&card->mutex);
> @@ -1895,6 +1896,7 @@ capture:
>  
>  		paths = dpcm_path_get(fe, SNDRV_PCM_STREAM_CAPTURE, &list);
>  		if (paths < 0) {
> +			dpcm_path_put(&list);
>  			dev_warn(fe->dev, "ASoC: %s no valid %s path\n",
>  					fe->dai_link->name,  "capture");
>  			mutex_unlock(&card->mutex);
> @@ -1959,6 +1961,7 @@ static int dpcm_fe_dai_open(struct snd_pcm_substream *fe_substream)
>  	fe->dpcm[stream].runtime = fe_substream->runtime;
>  
>  	if (dpcm_path_get(fe, stream, &list) <= 0) {
> +		dpcm_path_put(&list);
>  		dev_dbg(fe->dev, "ASoC: %s no valid %s route\n",
>  			fe->dai_link->name, stream ? "capture" : "playback");
>  	}



  reply	other threads:[~2014-04-03 15:57 UTC|newest]

Thread overview: 88+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-04-01 16:07 [3.8.y.z extended stable] Linux 3.8.13.21 stable review Kamal Mostafa
2014-04-01 16:07 ` [PATCH 3.8 01/86] 6lowpan: fix lockdep splats Kamal Mostafa
2014-04-01 16:07 ` [PATCH 3.8 02/86] 9p/trans_virtio.c: Fix broken zero-copy on vmalloc() buffers Kamal Mostafa
2014-04-01 16:07 ` [PATCH 3.8 03/86] ipv4: Fix runtime WARNING in rtmsg_ifa() Kamal Mostafa
2014-04-01 16:07 ` [PATCH 3.8 04/86] net: fix 'ip rule' iif/oif device rename Kamal Mostafa
2014-04-01 16:07 ` [PATCH 3.8 05/86] net: qmi_wwan: add Netgear Aircard 340U Kamal Mostafa
2014-04-01 16:07 ` [PATCH 3.8 06/86] tcp: tsq: fix nonagle handling Kamal Mostafa
2014-04-01 16:07 ` [PATCH 3.8 07/86] tg3: Fix deadlock in tg3_change_mtu() Kamal Mostafa
2014-04-01 16:07 ` [PATCH 3.8 08/86] net: asix: add missing flag to struct driver_info Kamal Mostafa
2014-04-01 16:07 ` [PATCH 3.8 09/86] bonding: 802.3ad: make aggregator_identifier bond-private Kamal Mostafa
2014-04-01 16:07 ` [PATCH 3.8 10/86] ipv4: fix counter in_slow_tot Kamal Mostafa
2014-04-01 16:07 ` [PATCH 3.8 11/86] net: sctp: fix sctp_connectx abi for ia32 emulation/compat mode Kamal Mostafa
2014-04-01 16:07 ` [PATCH 3.8 12/86] net: add and use skb_gso_transport_seglen() Kamal Mostafa
2014-04-01 16:07 ` [PATCH 3.8 13/86] net: core: introduce netif_skb_dev_features Kamal Mostafa
2014-04-01 16:07 ` [PATCH 3.8 14/86] net: ip, ipv6: handle gso skbs in forwarding path Kamal Mostafa
2014-04-01 16:07 ` [PATCH 3.8 15/86] net: use __GFP_NORETRY for high order allocations Kamal Mostafa
2014-04-01 16:07 ` [PATCH 3.8 16/86] net-tcp: fastopen: fix " Kamal Mostafa
2014-04-01 16:07 ` [PATCH 3.8 17/86] virtio-net: alloc big buffers also when guest can receive UFO Kamal Mostafa
2014-04-01 16:07 ` [PATCH 3.8 18/86] ipv6: reuse ip6_frag_id from ip6_ufo_append_data Kamal Mostafa
2014-04-01 16:07 ` [PATCH 3.8 19/86] sfc: check for NULL efx->ptp_data in efx_ptp_event Kamal Mostafa
2014-04-01 16:07 ` [PATCH 3.8 20/86] ipv6: ipv6_find_hdr restore prev functionality Kamal Mostafa
2014-04-01 16:07 ` [PATCH 3.8 21/86] tg3: Don't check undefined error bits in RXBD Kamal Mostafa
2014-04-01 16:07 ` [PATCH 3.8 22/86] net: sctp: fix sctp_sf_do_5_1D_ce to verify if we/peer is AUTH capable Kamal Mostafa
2014-04-01 16:07 ` [PATCH 3.8 23/86] mac80211: send control port protocol frames to the VO queue Kamal Mostafa
2014-04-01 16:07 ` [PATCH 3.8 24/86] mac80211: fix AP powersave TX vs. wakeup race Kamal Mostafa
2014-04-01 16:07 ` [PATCH 3.8 25/86] iwlwifi: dvm: clear IWL_STA_UCODE_INPROGRESS when assoc fails Kamal Mostafa
2014-04-01 16:07 ` [PATCH 3.8 26/86] ath9k: protect tid->sched check Kamal Mostafa
2014-04-01 16:07 ` [PATCH 3.8 27/86] ath9k: Fix ETSI compliance for AR9462 2.0 Kamal Mostafa
2014-04-01 16:07 ` [PATCH 3.8 28/86] iwlwifi: fix TX status for aggregated packets Kamal Mostafa
2014-04-01 16:07 ` [PATCH 3.8 29/86] genirq: Remove racy waitqueue_active check Kamal Mostafa
2014-04-01 16:07 ` [PATCH 3.8 30/86] sched: Fix double normalization of vruntime Kamal Mostafa
2014-04-01 16:07 ` [PATCH 3.8 31/86] cpuset: fix a race condition in __cpuset_node_allowed_softwall() Kamal Mostafa
2014-04-01 16:07 ` [PATCH 3.8 32/86] mac80211: fix association to 20/40 MHz VHT networks Kamal Mostafa
2014-04-01 16:07 ` [PATCH 3.8 33/86] firewire: net: fix use after free Kamal Mostafa
2014-04-01 16:07 ` [PATCH 3.8 34/86] mwifiex: do not advertise usb autosuspend support Kamal Mostafa
2014-04-01 16:07 ` [PATCH 3.8 35/86] ACPI / resources: ignore invalid ACPI device resources Kamal Mostafa
2014-04-01 16:07 ` [PATCH 3.8 36/86] NFS: Fix a delegation callback race Kamal Mostafa
2014-04-01 16:07 ` [PATCH 3.8 37/86] ALSA: hda - Added inverted digital-mic handling for Acer TravelMate 8371 Kamal Mostafa
2014-04-01 16:07 ` [PATCH 3.8 38/86] can: flexcan: fix shutdown: first disable chip, then all interrupts Kamal Mostafa
2014-04-01 16:07 ` [PATCH 3.8 39/86] can: flexcan: flexcan_open(): fix error path if flexcan_chip_start() fails Kamal Mostafa
2014-04-01 16:07 ` [PATCH 3.8 40/86] can: flexcan: fix transition from and to low power mode in chip_{en,dis}able Kamal Mostafa
2014-04-01 16:07 ` [PATCH 3.8 41/86] can: flexcan: flexcan_remove(): add missing netif_napi_del() Kamal Mostafa
2014-04-01 16:07 ` [PATCH 3.8 42/86] tracing: Do not add event files for modules that fail tracepoints Kamal Mostafa
2014-04-01 16:07 ` [PATCH 3.8 43/86] ocfs2: fix quota file corruption Kamal Mostafa
2014-04-01 16:07 ` [PATCH 3.8 44/86] rapidio/tsi721: fix tasklet termination in dma channel release Kamal Mostafa
2014-04-01 16:07 ` [PATCH 3.8 45/86] spi: coldfire-qspi: Fix getting correct address for *mcfqspi Kamal Mostafa
2014-04-01 16:07 ` [PATCH 3.8 46/86] ALSA: usb-audio: Add quirk for Logitech Webcam C500 Kamal Mostafa
2014-04-01 16:08 ` [PATCH 3.8 47/86] drm/radeon: TTM must be init with cpu-visible VRAM, v2 Kamal Mostafa
2014-04-01 16:08 ` [PATCH 3.8 48/86] drm/radeon/atom: select the proper number of lanes in transmitter setup Kamal Mostafa
2014-04-01 16:08 ` [PATCH 3.8 49/86] powerpc: Align p_dyn, p_rela and p_st symbols Kamal Mostafa
2014-04-01 16:08 ` [PATCH 3.8 50/86] libata: add ATA_HORKAGE_BROKEN_FPDMA_AA quirk for Seagate Momentus SpinPoint M8 (2BA30001) Kamal Mostafa
2014-04-01 16:08 ` [PATCH 3.8 51/86] usb: Add device quirk for Logitech HD Pro Webcams C920 and C930e Kamal Mostafa
2014-04-01 16:08 ` [PATCH 3.8 52/86] usb: Make DELAY_INIT quirk wait 100ms between Get Configuration requests Kamal Mostafa
2014-04-01 16:08 ` [PATCH 3.8 53/86] ARM: fix noMMU kallsyms symbol filtering Kamal Mostafa
2014-04-01 16:08 ` [PATCH 3.8 54/86] ARM: 7991/1: sa1100: fix compile problem on Collie Kamal Mostafa
2014-04-01 16:08 ` [PATCH 3.8 55/86] x86: Ignore NMIs that come in during early boot Kamal Mostafa
2014-04-01 16:08 ` [PATCH 3.8 56/86] x86: fix compile error due to X86_TRAP_NMI use in asm files Kamal Mostafa
2014-04-01 16:08 ` [PATCH 3.8 57/86] ASoC: pcm: free path list before exiting from error conditions Kamal Mostafa
2014-04-03 15:57   ` Kamal Mostafa [this message]
2014-04-01 16:08 ` [PATCH 3.8 58/86] mac80211: clear sequence/fragment number in QoS-null frames Kamal Mostafa
2014-04-01 16:08 ` [PATCH 3.8 59/86] mwifiex: copy AP's HT capability info correctly Kamal Mostafa
2014-04-01 16:08 ` [PATCH 3.8 60/86] net: unix socket code abuses csum_partial Kamal Mostafa
2014-04-01 16:08 ` [PATCH 3.8 61/86] ibmveth: Fix endian issues with MAC addresses Kamal Mostafa
2014-04-01 16:08 ` [PATCH 3.8 62/86] [SCSI] isci: fix reset timeout handling Kamal Mostafa
2014-04-01 16:08 ` [PATCH 3.8 63/86] [SCSI] isci: correct erroneous for_each_isci_host macro Kamal Mostafa
2014-04-01 16:08 ` [PATCH 3.8 64/86] [SCSI] qla2xxx: Poll during initialization for ISP25xx and ISP83xx Kamal Mostafa
2014-04-01 16:08 ` [PATCH 3.8 65/86] ocfs2 syncs the wrong range Kamal Mostafa
2014-04-01 16:08 ` [PATCH 3.8 66/86] mm/compaction: break out of loop on !PageBuddy in isolate_freepages_block Kamal Mostafa
2014-04-01 16:08 ` [PATCH 3.8 67/86] fs/proc/base.c: fix GPF in /proc/$PID/map_files Kamal Mostafa
2014-04-01 16:08 ` [PATCH 3.8 68/86] vmxnet3: fix netpoll race condition Kamal Mostafa
2014-04-01 16:08 ` [PATCH 3.8 69/86] [SCSI] storvsc: NULL pointer dereference fix Kamal Mostafa
2014-04-01 16:08 ` [PATCH 3.8 70/86] KVM: SVM: fix cr8 intercept window Kamal Mostafa
2014-04-01 16:08 ` [PATCH 3.8 71/86] drm/ttm: don't oops if no invalidate_caches() Kamal Mostafa
2014-04-01 16:08 ` [PATCH 3.8 72/86] vmxnet3: fix building without CONFIG_PCI_MSI Kamal Mostafa
2014-04-01 16:08 ` [PATCH 3.8 73/86] i2c: Remove usage of orphaned symbol OF_I2C Kamal Mostafa
2014-04-01 16:08 ` [PATCH 3.8 74/86] x86/amd/numa: Fix northbridge quirk to assign correct NUMA node Kamal Mostafa
2014-04-01 16:08 ` [PATCH 3.8 75/86] ipc: Fix 2 bugs in msgrcv() MSG_COPY implementation Kamal Mostafa
2014-04-01 16:08 ` [PATCH 3.8 76/86] drm/i915: Disable stolen memory when DMAR is active Kamal Mostafa
2014-04-01 16:08 ` [PATCH 3.8 77/86] ALSA: compress: Pass through return value of open ops callback Kamal Mostafa
2014-04-01 16:08 ` [PATCH 3.8 78/86] i2c: cpm: Fix build by adding of_address.h and of_irq.h Kamal Mostafa
2014-04-01 16:08 ` [PATCH 3.8 79/86] net: mvneta: rename MVNETA_GMAC2_PSC_ENABLE to MVNETA_GMAC2_PCS_ENABLE Kamal Mostafa
2014-04-01 16:08 ` [PATCH 3.8 80/86] Input: synaptics - add manual min/max quirk Kamal Mostafa
2014-04-01 16:08 ` [PATCH 3.8 81/86] Input: synaptics - add manual min/max quirk for ThinkPad X240 Kamal Mostafa
2014-04-01 16:08 ` [PATCH 3.8 82/86] x86: fix boot on uniprocessor systems Kamal Mostafa
2014-04-01 16:08 ` [PATCH 3.8 83/86] Input: mousedev - fix race when creating mixed device Kamal Mostafa
2014-04-01 16:08 ` [PATCH 3.8 84/86] staging: speakup: Prefix externally-visible symbols Kamal Mostafa
2014-04-01 16:08 ` [PATCH 3.8 85/86] ext4: atomically set inode->i_flags in ext4_set_inode_flags() Kamal Mostafa
2014-04-01 16:08 ` [PATCH 3.8 86/86] ioat: fix tasklet tear down Kamal Mostafa

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1396540644.20145.38.camel@fourier \
    --to=kamal@canonical.com \
    --cc=ben@decadent.org.uk \
    --cc=broonie@linaro.org \
    --cc=kernel-team@lists.ubuntu.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=plai@codeaurora.org \
    --cc=stable@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

Powered by JetHome